/*! For license information please see 91fc028ccc299cc3.vendor.js.LICENSE.txt */ (self.webpackChunk_canva_web=self.webpackChunk_canva_web||[]).push([[25436],{44080:(t,e)=>{"use strict";Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});class n extends Error{}class r extends n{}class i extends n{}class o extends n{}class s extends n{}class a extends n{}class u extends n{}class c extends n{constructor(t){super(`unhandled case: ${JSON.stringify(t)}`)}}let l=0;function f(){return l++}function h(t){return null!=t}function p(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Float32Array}function d(t){switch(t){case"i8":return 5120;case"u8":return 5121;case"i16":return 5122;case"u16":return 5123;case"i32":return 5124;case"u32":return 5125;case"f32":return 5126;default:throw new c(t)}}const y={FLOAT:{type:"float",name:"float",length:1},VEC2:{type:"float",name:"vec2",length:2},VEC3:{type:"float",name:"vec3",length:3},VEC4:{type:"float",name:"vec4",length:4}},v={MAT2:{type:"matrix",name:"mat2",length:4},MAT3:{type:"matrix",name:"mat3",length:9},MAT4:{type:"matrix",name:"mat4",length:16}},m={INT:{type:"int",name:"int",length:1},IVEC2:{type:"int",name:"ivec2",length:2},IVEC3:{type:"int",name:"ivec3",length:3},IVEC4:{type:"int",name:"ivec4",length:4},SAMPLER2D:{type:"int",name:"sampler2D",length:1}},b=new Map([[5126,y.FLOAT],[35664,y.VEC2],[35665,y.VEC3],[35666,y.VEC4],[35674,v.MAT2],[35675,v.MAT3],[35676,v.MAT4],[5124,m.INT],[35667,m.IVEC2],[35668,m.IVEC3],[35669,m.IVEC4],[35678,m.SAMPLER2D]]);class g{constructor(t){var e;this.id=f(),this.source=t,t instanceof ArrayBuffer?this.dataType="f32":(e=t,"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?this.dataType="f32":this.dataType=function(t){if(t instanceof Float32Array)return"f32";if(t instanceof Uint8Array)return"u8";if(t instanceof Int32Array)return"i32";if(t instanceof Uint32Array)return"u32";if(t instanceof Uint8ClampedArray)return"u8";if(t instanceof Int8Array)return"i8";if(t instanceof Int16Array)return"i16";if(t instanceof Uint16Array)return"u16";throw new c(t)}(t)),this.length=t.byteLength/function(t){switch(t){case"i8":case"u8":return 1;case"i16":case"u16":return 2;case"i32":case"u32":case"f32":return 4;default:throw new c(t)}}(this.dataType)}}class E extends g{constructor(){super(...arguments),this.resourceType="buffer"}}class w extends g{constructor(){super(...arguments),this.resourceType="elements"}}const _={points:0,lines:1,"line loop":2,"line strip":3,triangles:4,"triangle strip":5,"triangle fan":6},T={zero:0,one:1,"src color":768,"one minus src color":769,"dst color":774,"one minus dst color":775,"src alpha":770,"one minus src alpha":771,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},A={front:1028,back:1029,"front and back":1032},O={cw:2304,ccw:2305},x={add:32774,subtract:32778,"reverse subtract":32779},R={source:"one",destination:"zero",equation:"add"};const N={never:512,less:513,equal:514,lequal:515,greater:516,notequal:517,gequal:518,always:519};class S{constructor({primitive:t="triangles",shader:e,attributes:n,indices:r,count:i=0,instances:o,uniforms:s={},textures:a={},blend:u,depthTest:c,cullFace:l,frontFace:f,renderTarget:h}){var d;this.primitive=_[t],this.shader=e,this.attributes=function(t){const e=Object.create(null);for(const[n,r]of Object.entries(t)){let t;t="buffer"in r&&!p(r)?{...r,buffer:P(r.buffer)}:{buffer:P(r)},e[n]=t}return e}(n),this.indices=r?(d=r,Array.isArray(d)&&(d=new Uint16Array(d)),p(d)&&(d=new w(d)),d):void 0,this.count=i,this.instances=o,this.uniforms=s,this.textures=a,this._cullFace=l?A[l]:void 0,this._frontFace=f?O[f]:2305,this.blend=u?function(t){var e,n;const r={...R,...null!=(e=t.rgb)?e:t},i={...R,...null!=(n=t.alpha)?n:t};return{rgb:{source:T[r.source],destination:T[r.destination],equation:x[r.equation]},alpha:{source:T[i.source],destination:T[i.destination],equation:x[i.equation]}}}(u):void 0,this.depthTest=c?function(t){var e,n;return{mask:null==(e=t.mask)||e,func:N[null!=(n=t.func)?n:"less"],range:{near:0,far:1,...t.range}}}(c):void 0,this.renderTarget=h}get cullFace(){return this._cullFace}set cullFace(t){this._cullFace=void 0!==t?A[t]:void 0}get frontFace(){return this._frontFace}set frontFace(t){t in O&&(this._frontFace=O[t])}get resources(){return[this.shader,...Object.values(this.attributes).map((t=>t.buffer)),...Object.values(this.textures),this.indices,this.renderTarget].filter(h)}}function P(t){return Array.isArray(t)&&(t=new Float32Array(t)),p(t)&&(t=new E(t)),t}class C{constructor(t){this.id=f(),this.resourceType="shader",this.vertexSource=t.vertexSource,this.fragmentSource=t.fragmentSource}}const L="preserve",k="fixed";class I{constructor(t){this.id=f(),this.resourceType="texture",this.textureType="image",this.size=k,this.colorFormat="rgba",this.numberFormat="u8",this.source=t.source,this.name=t.name,this.alpha=t.alpha||L}get width(){return this.source.width}get height(){return this.source.height}}class j{constructor(t){this.id=f(),this.resourceType="texture",this.textureType="binary",this.size=k,this.source=t.source,this.name=t.name,this.alpha=t.alpha||L,this.width=t.width,this.height=t.height}get colorFormat(){const t=this.source.length/(this.width*this.height);if(3===t)return"rgb";if(4===t)return"rgba";throw new a(`Invalid number of color channels for binary texture with ID: ${this.id}. Number of channels must be 3 (RGB) or 4 (RGBA) but the provided data has ${t} channels.`)}get numberFormat(){return this.source instanceof Uint8Array?"u8":"f32"}}class B{constructor(t){this.id=f(),this.resourceType="texture",this.textureType="render",this.source=null,this.name=t.name,this.alpha=t.alpha||L,this.size=t.size||k,this.width=t.width||("fixed"===this.size?0:1),this.height=t.height||("fixed"===this.size?0:1),this.colorFormat=t.colorFormat,this.numberFormat=t.numberFormat}}function M(t,e){return{width:"fixed"===t.size?t.width||e.width:(t.width||1)*e.width,height:"fixed"===t.size?t.height||e.height:(t.height||1)*e.height}}function D(t,e){if("u32"===e.dataType&&!t.getExtension("OES_element_index_uint"))throw new s("UNSIGNED_INT indices are not supported on this device.");const n=t.createBuffer(),r="buffer"===e.resourceType?t.ARRAY_BUFFER:t.ELEMENT_ARRAY_BUFFER;return t.bindBuffer(r,n),t.bufferData(r,e.source,t.STATIC_DRAW),t.bindBuffer(r,null),n}class F{constructor(t,e,n){this.name=t.name,this.length=t.size,this.location=e;const r=b.get(t.type);if(!r)throw new a(`Type of uniform '${t.name}' is not supported.`);this.meta=r,this._data=this.parseData(n)}parseData(t){if(!t)return new Array(this.meta.length).fill(0);const e=this.meta.length*this.length;if(t.flat().length!==e)throw new a(`Could not set uniform '${this.meta.type} ${this.name}'. Expected data with a length of ${e} but your data has a length of ${t.length}.`);return t}equals(t){const e=this._data,n=t;if(e.length!==n.length)return!1;for(let r=0;r10})(t)&&(n=function(t){return t.replace("precision mediump float;","precision highp float;")}(n));const o=t.createShader(e);if(!o)throw new i("Could not create shader");if(t.shaderSource(o,n),t.compileShader(o),t.getShaderParameter(o,t.COMPILE_STATUS))return o;{const n=t.getShaderInfoLog(o);t.deleteShader(o);const i=e===t.VERTEX_SHADER?"vertex":"fragment";throw new r(`Could not compile ${i} shader. Details: ${n}`)}}function G(t,e){const n=function(t,e,n){const o=t.createProgram();if(!o)throw new i("Could not create program");const s=H(t,t.VERTEX_SHADER,e),a=H(t,t.FRAGMENT_SHADER,n);if(t.attachShader(o,s),t.attachShader(o,a),t.linkProgram(o),t.deleteShader(s),t.deleteShader(a),t.getProgramParameter(o,t.LINK_STATUS))return o;throw new r(`Could not link program. Details: ${t.getProgramInfoLog(o)}`)}(t,e.vertexSource,e.fragmentSource);t.useProgram(n);const o=t.getProgramParameter(n,t.ACTIVE_ATTRIBUTES),s=new Map;for(let r=0;r=2}return!0}class W{constructor(t){this.gl=t,this.maxAttribs=Number(t.getParameter(t.MAX_VERTEX_ATTRIBS)),this.shouldEnable=Array.from({length:this.maxAttribs}).fill(!1),this.hasEnabled=Array.from({length:this.maxAttribs}).fill(!1)}setEnabled(t,e){if(t<0)throw new Error(`Attribute index ${t} is out of bounds`);if(t>=this.maxAttribs)throw new Error(`Attribute index ${t} exceeds the maximum number of attributes supported by this device: ${this.maxAttribs}`);this.shouldEnable[t]=e}update(){for(let t=0;t{if(this.onContextLost){let e="No WebGLContextEvent";t&&(e=(null==t?void 0:t.statusMessage)||"No statusMessage"),this.onContextLost(new o(`Error: WebGL context lost - ${e}`))}},this.env=(null==e?void 0:e.env)||window||{devicePixelRatio:1};const n=t.canvas;if(!n)throw new o("Unexpected canvas type: "+typeof n);this.onDispose=null==e?void 0:e.onDispose,this.canvas=n;const[r,i]=this.canvasSize;this.canvas.width=((null==e?void 0:e.width)||r)*this.env.devicePixelRatio,this.canvas.height=((null==e?void 0:e.height)||i)*this.env.devicePixelRatio,this.canvas.addEventListener("webglcontextlost",this.handleContextLost,{once:!0}),this.fbo=t.createFramebuffer(),this.vertexAttribArrayState=new W(t)}flush(){this.gl.flush()}resize(...t){let e,n;"undefined"!=typeof HTMLCanvasElement&&this.canvas instanceof HTMLCanvasElement?[e=this.canvas.clientWidth,n=this.canvas.clientHeight]=t:[e,n]=t,this.canvas.width=e*this.env.devicePixelRatio,this.canvas.height=n*this.env.devicePixelRatio}load(t){const e=this.gl,n=Array.isArray(t)?t:t.resources;for(const r of n)switch(r.resourceType){case"buffer":case"elements":this.bufferCache.has(r.id)||this.bufferCache.set(r.id,D(e,r));break;case"shader":this.shaderCache.has(r.id)||this.shaderCache.set(r.id,G(e,r));break;case"texture":this.textureCache.has(r.id)||this.textureCache.set(r.id,q(e,r));break;default:throw new c(r)}}update(t){const e=this.gl,n=Array.isArray(t)?t:t.resources;for(const r of n)if("texture"===r.resourceType){const t=this.textureCache.get(r.id);if(!t)throw new o(`Could not update texture with ID: '${r.id}'. Did you remember to use load()?`);this.textureCache.set(r.id,q(e,r,t))}}clear(t,e){var n;const r=this.gl;if(e){const t=null==(n=this.textureCache.get(e.id))?void 0:n.texture;if(!t)throw new o(`Could not find render target with ID: ${e.id}. Did you remember to use load()?`);r.bindFramebuffer(r.FRAMEBUFFER,this.fbo),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0)}else r.bindFramebuffer(r.FRAMEBUFFER,null);const i=Array.isArray(t),s=i?t:t.color,a=i?1:t.depth,u=i?255:t.stencil,c=void 0!==s,l=void 0!==a,f=void 0!==u;c&&r.clearColor(...s),l&&r.clearDepth(a),f&&r.clearStencil(u);const h=(c?r.COLOR_BUFFER_BIT:0)|(l?r.DEPTH_BUFFER_BIT:0)|(f?r.STENCIL_BUFFER_BIT:0);r.clear(h)}render(t){var e,n,r,i,u,c,l;const f=this.gl,h=Array.isArray(t)?t:t.renderables;for(const p of h){const t=this.shaderCache.get(p.shader.id);if(!t)throw new o(`Could not find shader with ID: ${p.shader.id}. Did you remember to use load()?`);if(p.blend){const{rgb:t,alpha:e}=p.blend;f.enable(f.BLEND),f.blendFuncSeparate(t.source,t.destination,e.source,e.destination),f.blendEquationSeparate(t.equation,e.equation)}else f.disable(f.BLEND);if(p.depthTest){const{depthTest:t}=p;f.enable(f.DEPTH_TEST),f.depthMask(t.mask),f.depthFunc(t.func),f.depthRange(t.range.near,t.range.far)}else f.disable(f.DEPTH_TEST);if(p.cullFace?(f.enable(f.CULL_FACE),f.frontFace(p.frontFace),f.cullFace(p.cullFace)):f.disable(f.CULL_FACE),f.useProgram(t.program),p.indices){const t=this.getBuffer(p.indices);f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,t)}else f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,null);const h=p.instances?f.getExtension("ANGLE_instanced_arrays"):null;if(p.instances&&!h)throw new s("Instancing is required but not supported on this device");this.vertexAttribArrayState.reset();for(const[s,{location:a,meta:u}]of t.attributes.entries()){this.vertexAttribArrayState.setEnabled(a,!0);const t=p.attributes[s];if(!t)throw new o(`Could not locate shader attribute ${s} within Renderable's attributes.`);const c=d(null!=(e=t.type)?e:t.buffer.dataType),l=this.getBuffer(t.buffer);f.bindBuffer(f.ARRAY_BUFFER,l),f.vertexAttribPointer(a,u.length,c,null!=(n=t.normalized)&&n,null!=(r=t.stride)?r:0,null!=(i=t.offset)?i:0),p.instances&&t.divisor&&h.vertexAttribDivisorANGLE(a,t.divisor)}this.vertexAttribArrayState.update();const y={...p.uniforms,...this.commonUniforms};for(const[e,n]of t.uniforms.entries()){const t=y[e];if(!t)throw new a(`Could not find a value for uniform '${e}'. Make sure you provide a value.`);n.equals(t)||(n.data=t,U(f,n))}for(const[e,n]of t.textures.entries()){f.activeTexture(f.TEXTURE0+n.data.flat()[0]),f.bindTexture(f.TEXTURE_2D,null);const t=p.textures[e];if(!t)throw new a(`Could not find a texture associated with uniform '${e}'. Make sure you provide a value.`);const r=null==(u=this.textureCache.get(t.id))?void 0:u.texture;if(!r)throw new o(`Could not find texture with ID: ${t.id}. Did you remember to use load()?`);f.bindTexture(f.TEXTURE_2D,r)}if(p.renderTarget){const t=null==(c=this.textureCache.get(p.renderTarget.id))?void 0:c.texture;if(!t)throw new o(`Could not find render target with ID: ${p.renderTarget.id}. Did you remember to use load()?`);const{width:e,height:n}=V(f,p.renderTarget);f.bindFramebuffer(f.FRAMEBUFFER,this.fbo),f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,t,0),f.viewport(0,0,e,n)}else f.bindFramebuffer(f.FRAMEBUFFER,null),f.viewport(0,0,f.drawingBufferWidth,f.drawingBufferHeight);p.instances?p.indices?h.drawElementsInstancedANGLE(p.primitive,p.indices.length,d(p.indices.dataType),0,p.instances):h.drawArraysInstancedANGLE(p.primitive,0,p.count,p.instances):p.indices?f.drawElements(p.primitive,p.indices.length,d(p.indices.dataType),0):f.drawArrays(p.primitive,0,null!=(l=p.count)?l:0)}}release(t){const e=Array.isArray(t)?t:t.resources;for(const n of e)this.deleteResource(n.id,n.resourceType)}readPixels(t){var e;const n=this.gl;let r;if(t){const i=null==(e=this.textureCache.get(t.id))?void 0:e.texture;if(!i)throw new o(`Could not find render target with ID: ${t.id}. Did you remember to use load()?`);r=V(n,t),n.bindFramebuffer(n.FRAMEBUFFER,this.fbo),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,i,0)}else n.bindFramebuffer(n.FRAMEBUFFER,null),r={width:n.drawingBufferWidth,height:n.drawingBufferHeight};const i=new Uint8Array(r.width*r.height*4);return n.readPixels(0,0,r.width,r.height,n.RGBA,n.UNSIGNED_BYTE,i),new ImageData(new Uint8ClampedArray(i.buffer),r.width,r.height)}dispose(){var t;const e=this.gl;for(const r of this.bufferCache.keys())this.deleteResource(r,"buffer");for(const r of this.shaderCache.keys())this.deleteResource(r,"shader");for(const r of this.textureCache.keys())this.deleteResource(r,"texture");this.bufferCache.clear(),this.shaderCache.clear(),this.textureCache.clear(),e.deleteFramebuffer(this.fbo),e.bindBuffer(e.ARRAY_BUFFER,null),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null);const n=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);for(let r=0;r`void main() {${e}gl_FragColor.rgb *= gl_FragColor.a;\n}`))}function J(t){return function(t){return Array.isArray(t)}(t)?t:[t]}function Q(t,e,n,r){return new B({name:t,width:e,height:n,size:r||"relative",colorFormat:"rgba",numberFormat:"u8"})}class tt{constructor(t){this.index=0,this.buffers=null!=t?t:[new B({colorFormat:"rgba",numberFormat:"u8"}),new B({colorFormat:"rgba",numberFormat:"u8"})]}currentBuffer(){return this.buffers[this.index]}nextBuffer(){return this.index=(this.index+1)%this.buffers.length,this.buffers[this.index]}}const et=class t{static createPingpongBuffers({width:t,height:e,size:n}={}){return new tt([Q("A",t,e,n),Q("B",t,e,n)])}constructor({passes:e,uniforms:n,textures:r,options:{buffers:i,renderTarget:o,enableOneTriangleOptimisation:s}={}}){this.enableOneTriangleOptimisation=null!=s?s:t.enableOneTriangleOptimisation,i=null!=i?i:t.createPingpongBuffers(o);const{passes:a,uniforms:u}=this.convertShorthands(e,n);this.uniforms=u;const c=a[a.length-1];this.finalPassShaderForCanvas=this.getShader(c,!0),this.finalPassShaderForRenderTexture=this.getShader(c,!1);const l=this.getRenderTextures(a,o);this.renderables=this.getRenderables(a,l,i,r,o)}convertShorthands(t,e){return{passes:t.map((t=>"string"==typeof t?{fragment:t}:t)),uniforms:Object.fromEntries(Object.entries(null!=e?e:{}).map((([t,e])=>[t,J(e)])))}}getRenderTextures(t,e){const n=new Set;for(const i of t){if(i.inputs)for(const t of i.inputs)t!==K?n.add(t):console.warn(`Your render pass should not define ${K}. This will be automatically added.`);i.output&&n.add(i.output)}const r=new Map;for(const i of n)r.set(i,Q(i,null==e?void 0:e.width,null==e?void 0:e.height,null==e?void 0:e.size));return r}getRenderables(t,e,n,r,i){const o=t.slice(0,-1).map((t=>{const i=this.getShader(t,!1),o=n.currentBuffer(),s=t.output?this.getRenderTexture(t.output,e):n.nextBuffer();return this.getRenderable(t,i,o,s,e,r)})),s=i?this.finalPassShaderForRenderTexture:this.finalPassShaderForCanvas;return[...o,this.getRenderable(t[t.length-1],s,n.currentBuffer(),i,e,r)]}getRenderable(t,e,n,r,i,o){const s=this.uniforms,a=this.getTextures(t,{...o,[K]:n},i),u=this.enableOneTriangleOptimisation?Z:Y;return new S({...u,shader:e,uniforms:s,textures:a,renderTarget:r})}getShader(t,e){const n=`\nattribute vec2 aPosition;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n gl_Position = vec4(aPosition, 0.0, 1.0);\n vTexCoord = aPosition * 0.5 + 0.5;\n ${e?"vTexCoord.y = 1.0 - vTexCoord.y;":""}\n}\n `,r=this.getFragmentSource(t.fragment,e);return new C({vertexSource:n,fragmentSource:r})}getFragmentSource(t,e){return e?$(t):t}getRenderTexture(t,e){const n=e.get(t);if(!n)throw new a(`Unable to assign texture. Could not find texture '${t}'.`);return n}getTextures(t,e,n){if(t.inputs)for(const r of t.inputs)e[r]=this.getRenderTexture(r,n);return e}update({textures:t,uniforms:e,renderTarget:n}){if(t)for(const[r,i]of Object.entries(t))if(i)for(const t of this.renderables)t.textures[r]=i;if(e)for(const[r,i]of Object.entries(e))this.uniforms[r]&&(this.uniforms[r]=J(i));if(void 0!==n){const t=this.renderables[this.renderables.length-1],e=null===n?this.finalPassShaderForCanvas:this.finalPassShaderForRenderTexture;t.renderTarget=null!=n?n:void 0,t.shader=e}}get resources(){return[...new Set([...this.renderables.flatMap((t=>t.resources)),this.finalPassShaderForCanvas,this.finalPassShaderForRenderTexture])]}};et.enableOneTriangleOptimisation=!1;let nt,rt,it=et;function ot(t,e){if(!(nt&&rt||(nt=document.createElement("canvas"),rt=nt.getContext("2d"),rt)))throw new n("Unable to establish `CanvasRenderingContext2D` for debugging");return nt.width=t,nt.height=e,{canvas:nt,context:rt}}function st(t,e){const n=t.readPixels(e),{width:r,height:i}=n,{canvas:o,context:s}=ot(r,i);s.putImageData(n,0,0);const a=o.toDataURL();ct(null!=e?e:t.canvas,a,r/i)}function at(t){const{width:e,height:n}=t,{canvas:r,context:i}=ot(e,n);t.source instanceof ImageData?i.putImageData(t.source,0,0):i.drawImage(t.source,0,0);ct(t,r.toDataURL(),e/n)}function ut(t){const{source:e,colorFormat:n,width:r,height:i}=t,{canvas:o,context:s}=ot(r,i),a="rgba"===n,u=s.createImageData(r,i),c=u.data;for(let l=0,f=0;l\n \n \n \n \n ')}');\n background-position: center, 0 0;\n background-size: contain, 20px 20px;\n background-repeat: no-repeat, repeat;\n `;console.group("Debugging",t),console.log("%c ",r),console.groupEnd()}const lt="LkEaxkGQc",ft="mXA59BV4k",ht="ihJIFSpvi",pt="mjiW1vcGg",dt="T1GP6ZTnQ",yt="x8cqPYjGq",vt="zAvK5sktl",mt="j5BD_wqsh",bt="Flt8u8M0x",gt="zztE2SnZx",Et="LPlLw5zPI",wt="MLGoNA0wv",_t="m5a6RRSnk",Tt="MpMrqOkTf";var At=1e-6,Ot="undefined"!=typeof Float32Array?Float32Array:Array;function xt(){var t=new Ot(9);return Ot!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Rt(){var t=new Ot(16);return Ot!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Nt(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],f=e[8],h=e[9],p=e[10],d=e[11],y=e[12],v=e[13],m=e[14],b=e[15],g=n[0],E=n[1],w=n[2],_=n[3];return t[0]=g*r+E*a+w*f+_*y,t[1]=g*i+E*u+w*h+_*v,t[2]=g*o+E*c+w*p+_*m,t[3]=g*s+E*l+w*d+_*b,g=n[4],E=n[5],w=n[6],_=n[7],t[4]=g*r+E*a+w*f+_*y,t[5]=g*i+E*u+w*h+_*v,t[6]=g*o+E*c+w*p+_*m,t[7]=g*s+E*l+w*d+_*b,g=n[8],E=n[9],w=n[10],_=n[11],t[8]=g*r+E*a+w*f+_*y,t[9]=g*i+E*u+w*h+_*v,t[10]=g*o+E*c+w*p+_*m,t[11]=g*s+E*l+w*d+_*b,g=n[12],E=n[13],w=n[14],_=n[15],t[12]=g*r+E*a+w*f+_*y,t[13]=g*i+E*u+w*h+_*v,t[14]=g*o+E*c+w*p+_*m,t[15]=g*s+E*l+w*d+_*b,t}function St(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Pt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=n+n,a=r+r,u=i+i,c=n*s,l=r*s,f=r*a,h=i*s,p=i*a,d=i*u,y=o*s,v=o*a,m=o*u;return t[0]=1-f-d,t[1]=l+m,t[2]=h-v,t[3]=0,t[4]=l-m,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=h+v,t[9]=p-y,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Ct=function(t,e,n,r,i){var o,s=1/Math.tan(e/2);return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t};function Lt(){var t=new Ot(3);return Ot!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function kt(t,e,n){var r=new Ot(3);return r[0]=t,r[1]=e,r[2]=n,r}function It(){var t=new Ot(4);return Ot!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}Lt(),function(){var t=function(){var t=new Ot(4);return Ot!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();var jt=function(t,e,n,r){var i=new Ot(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i};!function(){var t=Lt(),e=kt(1,0,0),n=kt(0,1,0)}(),function(){var t=It(),e=It()}(),function(){var t=xt()}();const Bt=new j({width:1,height:1,source:new Uint8Array([0,0,0,0])});const Mt=t=>{if(void 0===t.camera)return{cameraKind:"perspective",perspective:{aspectRatio:1.7777777,yfov:.39959652046304894,znear:.10000000149011612,zfar:1e3},id:-1,name:"default camera",rotation:[0,0,0,0],scale:[1,1,1],translation:[0,0,.3499999940395355]};const e=void 0!==t.camera.perspective?"perspective":"orthographic";return"perspective"===e?{name:t.name,id:t.id,translation:t.translation,rotation:t.rotation,scale:t.scale,cameraKind:e,perspective:t.camera.perspective}:{name:t.name,id:t.id,translation:t.translation,rotation:t.rotation,scale:t.scale,cameraKind:e,orthographic:t.camera.orthographic}},Dt=1313821514,Ft=5130562;var Ut=(t=>(t[t.GLTF_BUFFER_TYPE_BYTE=5120]="GLTF_BUFFER_TYPE_BYTE",t[t.GLTF_BUFFER_TYPE_UNSIGNED_BYTE=5121]="GLTF_BUFFER_TYPE_UNSIGNED_BYTE",t[t.GLTF_BUFFER_TYPE_SHORT=5122]="GLTF_BUFFER_TYPE_SHORT",t[t.GLTF_BUFFER_TYPE_UNSIGNED_SHORT=5123]="GLTF_BUFFER_TYPE_UNSIGNED_SHORT",t[t.GLTF_BUFFER_TYPE_UNSIGNED_INT=5125]="GLTF_BUFFER_TYPE_UNSIGNED_INT",t[t.GLTF_BUFFER_TYPE_FLOAT=5126]="GLTF_BUFFER_TYPE_FLOAT",t))(Ut||{});const Ht={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Gt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Vt=async t=>(await fetch(t)).arrayBuffer(),qt=t=>(new TextDecoder).decode(t);class zt{constructor(t,e,n){this.chunks=[],this.bufferCache=[],this.imageCache=[],this.baseUrl="",this.gltf=e,this.chunks=n,this.baseUrl=t}async accessorData(t){if(!this.gltf.accessors)throw new Error("No accessors views found.");const e=this.gltf.accessors[t],n=Gt[e.type];return{buffer:await this.getBufferViewFromAccessor(e),elementsPerType:n}}async getBufferViewFromAccessor(t){if(void 0!==t.bufferView){const e=await this.bufferViewData(t.bufferView,t.componentType);return t.sparse?new Uint8Array(e):e}const e=Gt[t.type],n=Ht[t.componentType].BYTES_PER_ELEMENT*e*t.count;return new Uint8Array(n)}async bufferViewData(t,e){if(!this.gltf.bufferViews)throw new Error("No buffer views found.");const n=this.gltf.bufferViews[t],r=await this.getBufferData(n.buffer),i=n.byteLength||0,o=n.byteOffset||0,s=r.buffer,a=r.byteOffset;switch(e){case Ut.GLTF_BUFFER_TYPE_BYTE:return new Int8Array(s,a+o,i);case Ut.GLTF_BUFFER_TYPE_UNSIGNED_BYTE:return new Uint8Array(s,a+o,i);case Ut.GLTF_BUFFER_TYPE_SHORT:return new Int16Array(s,a+o,i/2);case Ut.GLTF_BUFFER_TYPE_UNSIGNED_SHORT:return new Uint16Array(s,a+o,i/2);case Ut.GLTF_BUFFER_TYPE_UNSIGNED_INT:return new Uint32Array(s,a+o,i/4);case Ut.GLTF_BUFFER_TYPE_FLOAT:return new Float32Array(s,a+o,i/4)}return new Uint8Array(s,a+o,i)}async getBufferData(t){if(void 0!==this.bufferCache[t])return this.bufferCache[t];if(!this.gltf.buffers)throw new Error("No buffers found.");const e=this.gltf.buffers[t];if(void 0===e.uri){if(0!==t)throw new Error("GLB container is required to be the first buffer");if(void 0===this.chunks)throw new Error("invalid gltf: buffer has no uri nor is there a GLB buffer");return this.chunks[t]}let n=new ArrayBuffer(0);n=e.uri.includes("data:application")?(t=>{try{const e=t.split("base64,")[1];return Uint8Array.from(atob(e),(t=>t.charCodeAt(0))).buffer}catch{return new ArrayBuffer(0)}})(e.uri):await Vt(this.baseUrl+e.uri);const r=new Uint8Array(n);return this.bufferCache[t]=r,r}async getImageData(t){if(void 0!==this.imageCache[t])return this.imageCache[t];if(!this.gltf.images)throw new Error("No images found.");const e=this.gltf.images[t];let n;if(void 0!==e.bufferView){const t=await this.bufferViewData(e.bufferView,Ut.GLTF_BUFFER_TYPE_BYTE),r=new Blob([t],{type:e.mimeType});n=URL.createObjectURL(r)}else{if(void 0===e.uri)throw new Error("Invalid glTF: image must either have a `uri` or a `bufferView`");n=e.uri.includes("base64")?e.uri:this.baseUrl+e.uri}const r=await(async t=>new Promise(((e,n)=>{const r=new Image;r.onload=()=>{e(r)},r.onerror=t=>{n(t)},r.crossOrigin="anonymous",r.src=t})))(n);return this.imageCache[t]=r,r}}const Wt=async t=>{let e;e=t.startsWith("http")||t.startsWith("blob")?t:(t=>{try{JSON.parse(t)}catch{const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let r=0,i=t.length;r{let e="";try{const n=new URL(t),r=n.href.split("/");e=n.href.replace(r[r.length-1],"")}catch{e=""}return e},Kt=async t=>{let e,n,r,i=[];try{e=JSON.parse(t),r={magic:"glTF",version:parseFloat(e.asset.version),length:0},n=new ArrayBuffer(0)}catch{n=t.toString().startsWith("blob")||t.toString().startsWith("http")?await Vt(t):t;const e=new DataView(n,0,12);r={magic:qt(new Uint8Array(n,0,4)),version:e.getUint32(4,!0),length:e.getUint32(8,!0)}}if("glTF"!==r.magic||r.version<2)throw new Error(`File format is not supported! Current header magic: ${r.magic}, version ${r.version}`);if(r.length>0){const t=Zt(n);e=t.json,i=t.chunks}if(void 0===e)throw new Error("JSON content not found.");if(void 0===e.asset||parseFloat(e.asset.version)<2)throw new Error("Unsupported asset. glTF versions >= 2.0 are supported.");return{json:e,chunks:i}},Zt=t=>{const e=[];let n;const r=new DataView(t,12);let i=0;for(;it instanceof Uint16Array?5123:t instanceof Uint32Array?5125:5121,Jt=t=>{const e=[];return t.forEach(((t,n)=>{var r,i;t.name.toLowerCase().includes(Yt)?e.push({meshIndex:n,name:t.name}):null!=(r=t.material)&&r.name.toLowerCase().includes(Yt)&&e.push({meshIndex:n,name:null==(i=t.material)?void 0:i.name})})),e},Qt=t=>{const e=[];return t.forEach((t=>{t.targets.length>0&&e.push(...t.targets)})),e},te=(t,e)=>{const n=(t=>{const e=[];return t.mesh.forEach(((n,r)=>{const i=n.uvs&&n.uvs.length?n.uvs:new Float32Array(n.positions.length/3*2);e.push({name:t.name+"_"+(r+1).toString(),vertices:n.positions,normals:n.normals,uvs:i,tangent:n.tangent,indices:n.indices,material:n.material,id:r,renderingContextBase:$t(n.indices)})})),e})(t),r=(t=>{let e=0;return t.forEach((t=>{e+=t.positions.length})),e})(t.mesh);return{mesh:n,placeholder:Jt(n),targets:Qt(t.mesh),transform:t.translation.length>0?St(Rt(),kt(t.translation[0],t.translation[1],t.translation[2])):Rt(),rotation:t.rotation.length>0?Pt(Rt(),jt(t.rotation[0],t.rotation[1],t.rotation[2],t.rotation[3])):Rt(),scale:t.scale.length>0?kt(t.scale[0],t.scale[1],t.scale[2]):kt(1,1,1),name:t.name,parrent:e,positionPrevious:new Float32Array(r),positionNext:new Float32Array(r),animation:{rotation:{times:new Uint8Array,values:[],interpolation:""},transform:{times:new Uint8Array,values:[],interpolation:""},scale:{times:new Uint8Array,values:[],interpolation:""},weights:{times:new Uint8Array,values:new Float32Array,targets:[],interpolation:"",positions:[]}},progression:0,extras:t.extras}},ee=(t=-1,e="",n=[])=>({id:t,name:e,children:n,mesh:[],scale:[],rotation:[],translation:[],camera:void 0,extras:{highlightCorrection:1,shadowCorrection:1}});e.AdditiveBlending={source:"src alpha",destination:"one",equation:"add"},e.BinaryTexture=j,e.Buffer=E,e.Effect=it,e.ElementsBuffer=w,e.FraglAllocationError=i,e.FraglCompilationError=r,e.FraglError=n,e.FraglInternalError=u,e.FraglPlatformError=s,e.FraglRuntimeError=o,e.FraglValidationError=a,e.GltfParser=class{constructor(t){this.src=t,this.camera=ee(),this.cameraModel=Mt(this.camera),this.nodes=[],this.clips=[],this.model=[],this.images=[],this.textures=[],this.samplers=[]}async parse(t={}){return this.model=[],this.asset=await Wt(this.src),this.images=await this.getTextureImages(t.imageFilesToReplace),this.updateTexturesData(),this.camera=ee(),this.nodes=await this.getSubNodes(),this.cameraModel=this.getCameraModel(),this.clips=await this.getClips(),this.model=await this.getModel(),this.updateAnimation(),{camera:this.cameraModel,model:this.model,images:this.images,textures:this.textures,samplers:this.samplers}}async getModel(t,e,n=[]){const r=(void 0===t?this.nodes:t).map((t=>{const r=te(t,e);return t.children.length>0&&this.getModel(t.children,t,n),r}));return n.push(...await Promise.all(r)),n}updateAnimation(){this.clips.forEach((t=>{t.tracks.forEach((t=>{const e=this.model.findIndex((e=>e.name===t.targetObject));if(e>-1){const n=this.model[e];switch(t.targetProperty.toLocaleLowerCase()){case"translation":n.animation.transform.values=this.decodeVector3Animation(t.values,t.valuesElements),n.animation.transform.times=t.times,n.animation.transform.interpolation=t.interpolation;break;case"rotation":n.animation.rotation.values=this.decodeQuaternionAnimation(t.values,t.valuesElements),n.animation.rotation.times=t.times,n.animation.rotation.interpolation=t.interpolation;break;case"scale":n.animation.scale.values=this.decodeVector3Animation(t.values,t.valuesElements),n.animation.scale.times=t.times,n.animation.scale.interpolation=t.interpolation;break;case"weights":n.targets.length>0&&(n.animation.weights.targets=this.model[e].targets,n.animation.weights.times=t.times,n.animation.weights.values=t.values,n.animation.weights.interpolation=t.interpolation,((t,e)=>{const n=t.values.length/t.targets.length;for(let r=0;r-1&&(this.cameraModel.animation=this.model[this.cameraModel.id].animation,this.model=this.model.filter((t=>!t.name.toLocaleLowerCase().includes("camera"))))}getModelVerticesLength(t){let e=0;return t.forEach((t=>{e+=t.vertices.length})),e}decodeQuaternionAnimation(t,e){const n=[];let r=0;for(let i=0;i{const e=await this.getTracks(t);return{name:t.name,tracks:e}}));return t.push(...await Promise.all(n)),t}getTracks(t){const e=this.getAsset();return Promise.all(t.channels.map((async n=>{var r;const i=t.samplers[n.sampler],o=await e.accessorData(i.input),s=await e.accessorData(i.output);return{targetIndex:n.target.node,targetObject:e.gltf.nodes[n.target.node].name,targetProperty:n.target.path,interpolation:null!=(r=i.interpolation)?r:"LINEAR",times:o.buffer,timesElements:o.elementsPerType,values:s.buffer,valuesElements:s.elementsPerType}})))}getCameraModel(){return Mt(this.camera)}updateTexturesData(){var t;this.textures=[],this.samplers=[];const e=this.getGltfFromAsset();this.samplers=null!=(t=e.samplers)?t:[],void 0!==e.textures&&e.textures.forEach(((t,e)=>{t&&(this.textures[e]={sampler:t.sampler,source:t.source})}))}replaceImages(t,e){const n=e.find((e=>{var n;if(null!=(n=t.name)&&n.includes(e.name))return e}));if(!n)throw new a(`No image file found with the name of: ${t.name}`);return n}async getTextureImages(t){if(void 0===this.asset||void 0===this.asset.gltf.images)return[];const e=this.asset.gltf.images.map((async(e,n)=>{var r;return t?this.replaceImages(e,t):{mimeType:e.mimeType,name:e.name,img:await(null==(r=this.asset)?void 0:r.getImageData(n))}}));return Promise.all(e)}async getSubNodes(t,e){const n=this.getGltfFromAsset(),r=0|n.scene,i=n.scenes[r],o=(void 0===t?i.nodes:t).map((async t=>{const r=n.nodes[t],i=ee(t,r.name);return void 0!==r.children&&(i.children=await this.getSubNodes(r.children,r)),void 0!==r.mesh&&(i.mesh=await this.getSubMesh(n.meshes[r.mesh])),i.rotation=[0,0,0,0],void 0!==r.rotation?i.rotation=r.rotation:void 0!==e&&void 0!==e.rotation&&(i.rotation[0]=i.rotation[0]*e.rotation[0],i.rotation[1]=i.rotation[1]*e.rotation[1],i.rotation[2]=i.rotation[2]*e.rotation[2],i.rotation[3]=i.rotation[3]*e.rotation[3]),i.translation=[0,0,0],void 0!==r.translation?i.translation=r.translation:void 0!==e&&void 0!==e.translation&&(i.translation[0]=i.translation[0]*e.translation[0],i.translation[1]=i.translation[1]*e.translation[1],i.translation[2]=i.translation[2]*e.translation[2]),i.scale=[1,1,1],void 0!==r.scale?i.scale=r.scale:void 0!==e&&void 0!==e.scale&&(i.scale[0]=i.scale[0]*e.scale[0],i.scale[1]=i.scale[1]*e.scale[1],i.scale[2]=i.scale[2]*e.scale[2]),void 0!==r.camera&&(i.camera=n.cameras[r.camera],this.camera=i),i.extras=void 0,void 0!==r.extras&&(i.extras={highlightCorrection:1,shadowCorrection:1},i.extras.highlightCorrection=void 0!==r.extras.Highlight_Correction?r.extras.Highlight_Correction:1,i.extras.shadowCorrection=void 0!==r.extras.Shadow_Correction?r.extras.Shadow_Correction:1),i}));return Promise.all(o)}getMaterial(t){const e=this.getAsset().gltf.materials[t];return void 0!==e.pbrMetallicRoughness&&(void 0===e.pbrMetallicRoughness.metallicFactor&&(e.pbrMetallicRoughness.metallicFactor=1),void 0===e.pbrMetallicRoughness.roughnessFactor&&(e.pbrMetallicRoughness.roughnessFactor=1),void 0===e.pbrMetallicRoughness.baseColorFactor&&(e.pbrMetallicRoughness.baseColorFactor=[1,1,1,1])),e}async getTargets(t){const e=this.getAsset(),n=t.targets.map((async t=>{const n={normals:new Uint8Array(0),positions:new Uint8Array(0),tangent:new Uint8Array(0)};return void 0!==t.POSITION&&(n.positions=(await e.accessorData(t.POSITION)).buffer),void 0!==t.NORMAL&&(n.normals=(await e.accessorData(t.NORMAL)).buffer),void 0!==t.TANGENT&&(n.tangent=(await e.accessorData(t.TANGENT)).buffer),n}));return Promise.all(n)}async getSubMesh(t){const e=this.getAsset(),n=t.primitives.map((async t=>{const n={positions:new Uint8Array(0),normals:new Uint8Array(0),uvs:new Uint8Array(0),tangent:new Uint8Array(0),indices:new Uint8Array(0),targets:[],material:void 0};if(void 0!==t.attributes.POSITION&&(n.positions=(await e.accessorData(t.attributes.POSITION)).buffer),void 0!==t.attributes.NORMAL&&(n.normals=(await e.accessorData(t.attributes.NORMAL)).buffer),void 0!==t.attributes.TEXCOORD_0&&(n.uvs=(await e.accessorData(t.attributes.TEXCOORD_0)).buffer,0===n.uvs.length&&(n.uvs=new Float32Array(n.positions.length/3*2))),void 0!==t.attributes.TANGENT&&(n.tangent=(await e.accessorData(t.attributes.TANGENT)).buffer),void 0!==t.indices){const r=await e.accessorData(t.indices);n.indices=r.buffer}return void 0!==t.targets&&(n.targets=await this.getTargets(t)),void 0!==t.material&&(n.material=this.getMaterial(t.material)),n}));return Promise.all(n)}getAsset(){if(void 0===this.asset)throw new Error("Asset is undefined");return this.asset}getGltfFromAsset(){return this.getAsset().gltf}},e.ImageTexture=I,e.MockWebGLRenderingContext=class{constructor(t){this.canvas=t,this.drawingBufferColorSpace="srgb",this.DEPTH_BUFFER_BIT=256,this.STENCIL_BUFFER_BIT=1024,this.COLOR_BUFFER_BIT=16384,this.POINTS=0,this.LINES=1,this.LINE_LOOP=2,this.LINE_STRIP=3,this.TRIANGLES=4,this.TRIANGLE_STRIP=5,this.TRIANGLE_FAN=6,this.ZERO=0,this.ONE=1,this.SRC_COLOR=768,this.ONE_MINUS_SRC_COLOR=769,this.SRC_ALPHA=770,this.ONE_MINUS_SRC_ALPHA=771,this.DST_ALPHA=772,this.ONE_MINUS_DST_ALPHA=773,this.DST_COLOR=774,this.ONE_MINUS_DST_COLOR=775,this.SRC_ALPHA_SATURATE=776,this.FUNC_ADD=32774,this.BLEND_EQUATION=32777,this.BLEND_EQUATION_RGB=32777,this.BLEND_EQUATION_ALPHA=34877,this.FUNC_SUBTRACT=32778,this.FUNC_REVERSE_SUBTRACT=32779,this.BLEND_DST_RGB=32968,this.BLEND_SRC_RGB=32969,this.BLEND_DST_ALPHA=32970,this.BLEND_SRC_ALPHA=32971,this.CONSTANT_COLOR=32769,this.ONE_MINUS_CONSTANT_COLOR=32770,this.CONSTANT_ALPHA=32771,this.ONE_MINUS_CONSTANT_ALPHA=32772,this.BLEND_COLOR=32773,this.ARRAY_BUFFER=34962,this.ELEMENT_ARRAY_BUFFER=34963,this.ARRAY_BUFFER_BINDING=34964,this.ELEMENT_ARRAY_BUFFER_BINDING=34965,this.STREAM_DRAW=35040,this.STATIC_DRAW=35044,this.DYNAMIC_DRAW=35048,this.BUFFER_SIZE=34660,this.BUFFER_USAGE=34661,this.CURRENT_VERTEX_ATTRIB=34342,this.FRONT=1028,this.BACK=1029,this.FRONT_AND_BACK=1032,this.CULL_FACE=2884,this.BLEND=3042,this.DITHER=3024,this.STENCIL_TEST=2960,this.DEPTH_TEST=2929,this.SCISSOR_TEST=3089,this.POLYGON_OFFSET_FILL=32823,this.SAMPLE_ALPHA_TO_COVERAGE=32926,this.SAMPLE_COVERAGE=32928,this.NO_ERROR=0,this.INVALID_ENUM=1280,this.INVALID_VALUE=1281,this.INVALID_OPERATION=1282,this.OUT_OF_MEMORY=1285,this.CW=2304,this.CCW=2305,this.LINE_WIDTH=2849,this.ALIASED_POINT_SIZE_RANGE=33901,this.ALIASED_LINE_WIDTH_RANGE=33902,this.CULL_FACE_MODE=2885,this.FRONT_FACE=2886,this.DEPTH_RANGE=2928,this.DEPTH_WRITEMASK=2930,this.DEPTH_CLEAR_VALUE=2931,this.DEPTH_FUNC=2932,this.STENCIL_CLEAR_VALUE=2961,this.STENCIL_FUNC=2962,this.STENCIL_FAIL=2964,this.STENCIL_PASS_DEPTH_FAIL=2965,this.STENCIL_PASS_DEPTH_PASS=2966,this.STENCIL_REF=2967,this.STENCIL_VALUE_MASK=2963,this.STENCIL_WRITEMASK=2968,this.STENCIL_BACK_FUNC=34816,this.STENCIL_BACK_FAIL=34817,this.STENCIL_BACK_PASS_DEPTH_FAIL=34818,this.STENCIL_BACK_PASS_DEPTH_PASS=34819,this.STENCIL_BACK_REF=36003,this.STENCIL_BACK_VALUE_MASK=36004,this.STENCIL_BACK_WRITEMASK=36005,this.VIEWPORT=2978,this.SCISSOR_BOX=3088,this.COLOR_CLEAR_VALUE=3106,this.COLOR_WRITEMASK=3107,this.UNPACK_ALIGNMENT=3317,this.PACK_ALIGNMENT=3333,this.MAX_TEXTURE_SIZE=3379,this.MAX_VIEWPORT_DIMS=3386,this.SUBPIXEL_BITS=3408,this.RED_BITS=3410,this.GREEN_BITS=3411,this.BLUE_BITS=3412,this.ALPHA_BITS=3413,this.DEPTH_BITS=3414,this.STENCIL_BITS=3415,this.POLYGON_OFFSET_UNITS=10752,this.POLYGON_OFFSET_FACTOR=32824,this.TEXTURE_BINDING_2D=32873,this.SAMPLE_BUFFERS=32936,this.SAMPLES=32937,this.SAMPLE_COVERAGE_VALUE=32938,this.SAMPLE_COVERAGE_INVERT=32939,this.COMPRESSED_TEXTURE_FORMATS=34467,this.DONT_CARE=4352,this.FASTEST=4353,this.NICEST=4354,this.GENERATE_MIPMAP_HINT=33170,this.BYTE=5120,this.UNSIGNED_BYTE=5121,this.SHORT=5122,this.UNSIGNED_SHORT=5123,this.INT=5124,this.UNSIGNED_INT=5125,this.FLOAT=5126,this.DEPTH_COMPONENT=6402,this.ALPHA=6406,this.RGB=6407,this.RGBA=6408,this.LUMINANCE=6409,this.LUMINANCE_ALPHA=6410,this.UNSIGNED_SHORT_4_4_4_4=32819,this.UNSIGNED_SHORT_5_5_5_1=32820,this.UNSIGNED_SHORT_5_6_5=33635,this.FRAGMENT_SHADER=35632,this.VERTEX_SHADER=35633,this.MAX_VERTEX_ATTRIBS=34921,this.MAX_VERTEX_UNIFORM_VECTORS=36347,this.MAX_VARYING_VECTORS=36348,this.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661,this.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660,this.MAX_TEXTURE_IMAGE_UNITS=34930,this.MAX_FRAGMENT_UNIFORM_VECTORS=36349,this.SHADER_TYPE=35663,this.DELETE_STATUS=35712,this.LINK_STATUS=35714,this.VALIDATE_STATUS=35715,this.ATTACHED_SHADERS=35717,this.ACTIVE_UNIFORMS=35718,this.ACTIVE_ATTRIBUTES=35721,this.SHADING_LANGUAGE_VERSION=35724,this.CURRENT_PROGRAM=35725,this.NEVER=512,this.LESS=513,this.EQUAL=514,this.LEQUAL=515,this.GREATER=516,this.NOTEQUAL=517,this.GEQUAL=518,this.ALWAYS=519,this.KEEP=7680,this.REPLACE=7681,this.INCR=7682,this.DECR=7683,this.INVERT=5386,this.INCR_WRAP=34055,this.DECR_WRAP=34056,this.VENDOR=7936,this.RENDERER=7937,this.VERSION=7938,this.NEAREST=9728,this.LINEAR=9729,this.NEAREST_MIPMAP_NEAREST=9984,this.LINEAR_MIPMAP_NEAREST=9985,this.NEAREST_MIPMAP_LINEAR=9986,this.LINEAR_MIPMAP_LINEAR=9987,this.TEXTURE_MAG_FILTER=10240,this.TEXTURE_MIN_FILTER=10241,this.TEXTURE_WRAP_S=10242,this.TEXTURE_WRAP_T=10243,this.TEXTURE_2D=3553,this.TEXTURE=5890,this.TEXTURE_CUBE_MAP=34067,this.TEXTURE_BINDING_CUBE_MAP=34068,this.TEXTURE_CUBE_MAP_POSITIVE_X=34069,this.TEXTURE_CUBE_MAP_NEGATIVE_X=34070,this.TEXTURE_CUBE_MAP_POSITIVE_Y=34071,this.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072,this.TEXTURE_CUBE_MAP_POSITIVE_Z=34073,this.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074,this.MAX_CUBE_MAP_TEXTURE_SIZE=34076,this.TEXTURE0=33984,this.TEXTURE1=33985,this.TEXTURE2=33986,this.TEXTURE3=33987,this.TEXTURE4=33988,this.TEXTURE5=33989,this.TEXTURE6=33990,this.TEXTURE7=33991,this.TEXTURE8=33992,this.TEXTURE9=33993,this.TEXTURE10=33994,this.TEXTURE11=33995,this.TEXTURE12=33996,this.TEXTURE13=33997,this.TEXTURE14=33998,this.TEXTURE15=33999,this.TEXTURE16=34e3,this.TEXTURE17=34001,this.TEXTURE18=34002,this.TEXTURE19=34003,this.TEXTURE20=34004,this.TEXTURE21=34005,this.TEXTURE22=34006,this.TEXTURE23=34007,this.TEXTURE24=34008,this.TEXTURE25=34009,this.TEXTURE26=34010,this.TEXTURE27=34011,this.TEXTURE28=34012,this.TEXTURE29=34013,this.TEXTURE30=34014,this.TEXTURE31=34015,this.ACTIVE_TEXTURE=34016,this.REPEAT=10497,this.CLAMP_TO_EDGE=33071,this.MIRRORED_REPEAT=33648,this.FLOAT_VEC2=35664,this.FLOAT_VEC3=35665,this.FLOAT_VEC4=35666,this.INT_VEC2=35667,this.INT_VEC3=35668,this.INT_VEC4=35669,this.BOOL=35670,this.BOOL_VEC2=35671,this.BOOL_VEC3=35672,this.BOOL_VEC4=35673,this.FLOAT_MAT2=35674,this.FLOAT_MAT3=35675,this.FLOAT_MAT4=35676,this.SAMPLER_2D=35678,this.SAMPLER_CUBE=35680,this.VERTEX_ATTRIB_ARRAY_ENABLED=34338,this.VERTEX_ATTRIB_ARRAY_SIZE=34339,this.VERTEX_ATTRIB_ARRAY_STRIDE=34340,this.VERTEX_ATTRIB_ARRAY_TYPE=34341,this.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922,this.VERTEX_ATTRIB_ARRAY_POINTER=34373,this.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975,this.IMPLEMENTATION_COLOR_READ_TYPE=35738,this.IMPLEMENTATION_COLOR_READ_FORMAT=35739,this.COMPILE_STATUS=35713,this.LOW_FLOAT=36336,this.MEDIUM_FLOAT=36337,this.HIGH_FLOAT=36338,this.LOW_INT=36339,this.MEDIUM_INT=36340,this.HIGH_INT=36341,this.FRAMEBUFFER=36160,this.RENDERBUFFER=36161,this.RGBA4=32854,this.RGB5_A1=32855,this.RGBA8=32856,this.RGB565=36194,this.DEPTH_COMPONENT16=33189,this.STENCIL_INDEX8=36168,this.DEPTH_STENCIL=34041,this.RENDERBUFFER_WIDTH=36162,this.RENDERBUFFER_HEIGHT=36163,this.RENDERBUFFER_INTERNAL_FORMAT=36164,this.RENDERBUFFER_RED_SIZE=36176,this.RENDERBUFFER_GREEN_SIZE=36177,this.RENDERBUFFER_BLUE_SIZE=36178,this.RENDERBUFFER_ALPHA_SIZE=36179,this.RENDERBUFFER_DEPTH_SIZE=36180,this.RENDERBUFFER_STENCIL_SIZE=36181,this.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048,this.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049,this.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050,this.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051,this.COLOR_ATTACHMENT0=36064,this.DEPTH_ATTACHMENT=36096,this.STENCIL_ATTACHMENT=36128,this.DEPTH_STENCIL_ATTACHMENT=33306,this.NONE=0,this.FRAMEBUFFER_COMPLETE=36053,this.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054,this.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055,this.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057,this.FRAMEBUFFER_UNSUPPORTED=36061,this.FRAMEBUFFER_BINDING=36006,this.RENDERBUFFER_BINDING=36007,this.MAX_RENDERBUFFER_SIZE=34024,this.INVALID_FRAMEBUFFER_OPERATION=1286,this.UNPACK_FLIP_Y_WEBGL=37440,this.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441,this.CONTEXT_LOST_WEBGL=37442,this.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443,this.BROWSER_DEFAULT_WEBGL=37444}get drawingBufferWidth(){return this.canvas.width}get drawingBufferHeight(){return this.canvas.height}activeTexture(){}attachShader(){}bindAttribLocation(){}bindBuffer(){}bindFramebuffer(){}bindRenderbuffer(){}bindTexture(){}blendColor(){}blendEquation(){}blendEquationSeparate(){}blendFunc(){}blendFuncSeparate(){}bufferData(){}bufferSubData(){}checkFramebufferStatus(){return this.FRAMEBUFFER_COMPLETE}clear(){}clearColor(){}clearDepth(){}clearStencil(){}colorMask(){}compileShader(){}compressedTexImage2D(){}compressedTexSubImage2D(){}copyTexImage2D(){}copyTexSubImage2D(){}createBuffer(){return{}}createFramebuffer(){return{}}createProgram(){return{}}createRenderbuffer(){return{}}createShader(){return{}}createTexture(){return{}}cullFace(){}deleteBuffer(){}deleteFramebuffer(){}deleteProgram(){}deleteRenderbuffer(){}deleteShader(){}deleteTexture(){}depthFunc(){}depthMask(){}depthRange(){}detachShader(){}disable(){}disableVertexAttribArray(){}drawArrays(){}drawElements(){}enable(){}enableVertexAttribArray(){}finish(){}flush(){}framebufferRenderbuffer(){}framebufferTexture2D(){}frontFace(){}generateMipmap(){}getActiveAttrib(){return{}}getActiveUniform(){return null}getAttachedShaders(){return[]}getAttribLocation(){return 0}getBufferParameter(){return 0}getContextAttributes(){return{}}getError(){return this.NO_ERROR}getExtension(){return null}getFramebufferAttachmentParameter(){return 0}getParameter(){return 0}getProgramInfoLog(){return""}getProgramParameter(){return{}}getRenderbufferParameter(){return 0}getShaderInfoLog(){return""}getShaderParameter(){return!0}getShaderPrecisionFormat(){return{rangeMin:127,rangeMax:127,precision:127}}getShaderSource(){return""}getSupportedExtensions(){return[]}getTexParameter(){return 0}getUniform(){return 0}getUniformLocation(){return null}getVertexAttrib(){return 0}getVertexAttribOffset(){return 0}hint(){}isBuffer(){return!1}isContextLost(){return!1}isEnabled(){return!1}isFramebuffer(){return!1}isProgram(){return!1}isRenderbuffer(){return!1}isShader(){return!1}isTexture(){return!1}lineWidth(){}linkProgram(){}pixelStorei(){}polygonOffset(){}readPixels(){}renderbufferStorage(){}sampleCoverage(){}scissor(){}shaderSource(){}stencilFunc(){}stencilFuncSeparate(){}stencilMask(){}stencilMaskSeparate(){}stencilOp(){}stencilOpSeparate(){}texImage2D(){}texParameterf(){}texParameteri(){}texSubImage2D(){}uniform1f(){}uniform1fv(){}uniform1i(){}uniform1iv(){}uniform2f(){}uniform2fv(){}uniform2i(){}uniform2iv(){}uniform3f(){}uniform3fv(){}uniform3i(){}uniform3iv(){}uniform4f(){}uniform4fv(){}uniform4i(){}uniform4iv(){}uniformMatrix2fv(){}uniformMatrix3fv(){}uniformMatrix4fv(){}useProgram(){}validateProgram(){}vertexAttrib1f(){}vertexAttrib1fv(){}vertexAttrib2f(){}vertexAttrib2fv(){}vertexAttrib3f(){}vertexAttrib3fv(){}vertexAttrib4f(){}vertexAttrib4fv(){}vertexAttribPointer(){}viewport(){}},e.ModelViewer=class{constructor(t){this._renderables={},this.projectionMatrix=Rt(),this.viewMatrix=Rt(),this.modelMatrix=Rt(),this.modelViewProjectionMatrix=Rt(),this._renderables=t}get renderables(){return Object.values(this._renderables)}get resources(){return this.renderables.flatMap((t=>t.resources))}updateAll({uniforms:t}){if(t)for(const e of this.renderables)t.uCameraPosition&&(e.uniforms[wt]=t.uCameraPosition),t.uMVPMatrix&&(e.uniforms[dt]=t.uMVPMatrix),t.uNormalMatrix&&(e.uniforms[Et]=t.uNormalMatrix)}updateOne({id:t,textures:e}){const n=this._renderables[t];if(!n)throw new a(`Renderable with id ${t} not found`);e&&e.uPlaceholderTexture&&(n.textures[bt]=e.uPlaceholderTexture)}getUniformsToUpdateView(t,e){return{uniforms:{uCameraPosition:[...t],uMVPMatrix:this.createMVPMatrix(e,t),uNormalMatrix:this.createNormalMatrix()}}}createMVPMatrix(t,e){Ct(this.projectionMatrix,.4,t,.01,1e3);const n=kt(0,0,0),r=kt(0,1,0);return function(t,e,n,r){var i,o,s,a,u,c,l,f,h,p,d=e[0],y=e[1],v=e[2],m=r[0],b=r[1],g=r[2],E=n[0],w=n[1],_=n[2];Math.abs(d-E)t.mesh)).flat()}getRenderables(){return Object.fromEntries(this.meshes.map((t=>[t.name,this.gltfMeshToRenderable(t)])))}gltfMeshToRenderable(t){if(!t.material)throw new s("Mesh material not found");const{baseColorFactor:e,baseColorTexture:n,isBaseColorTexture:r,metallicFactor:i,roughnessFactor:o,roughnessTexture:a,isRoughnessTexture:u,normalTexture:c,isNormalTexture:l,placeholder:f,isPlaceholderTexture:h,isDoubleSided:p}=this.gltfMaterialToTextures(t.material,this.gltf.images,this.gltf.textures),d=r?1:0,y=l?1:0,v=h?1:0,m=u?1:0;return new S({attributes:{[ht]:new E(t.vertices),[pt]:new E(t.normals),[gt]:new E(t.uvs)},textures:{[mt]:n,[bt]:f,[_t]:c,[Tt]:a},uniforms:{[wt]:[0,0,0],[lt]:[e[0],e[1],e[2],e[3]],[vt]:[i],[yt]:[o],[ft]:[d,y,v,m],[dt]:Array.from(Rt()),[Et]:Array.from(Rt())},shader:this.shader,indices:new w(t.indices),depthTest:{mask:!0,func:"less",range:{near:0,far:1}},...!p&&{cullFace:"back"}})}gltfMaterialToTextures(t,e,n){const r=t.pbrMetallicRoughness.baseColorFactor,i=t.pbrMetallicRoughness.metallicFactor,o=t.pbrMetallicRoughness.roughnessFactor,s=void 0!==t.pbrMetallicRoughness.baseColorTexture,a=t.pbrMetallicRoughness.baseColorTexture?new I({source:e[n[t.pbrMetallicRoughness.baseColorTexture.index].source].img}):Bt,u=t.normalTexture?new I({source:e[n[t.normalTexture.index].source].img}):Bt,c=void 0!==t.normalTexture,l=t.pbrMetallicRoughness.metallicRoughnessTexture?new I({source:e[n[t.pbrMetallicRoughness.metallicRoughnessTexture.index].source].img}):Bt,f=void 0!==t.pbrMetallicRoughness.metallicRoughnessTexture,h=t.name.includes("placeholder");return{baseColorFactor:r,baseColorTexture:a,metallicFactor:i,roughnessFactor:o,roughnessTexture:l,isRoughnessTexture:f,isBaseColorTexture:s,normalTexture:u,isNormalTexture:c,placeholder:Bt,isPlaceholderTexture:h,isDoubleSided:t.doubleSided}}getDataToUpdateAllPlaceholders(t){return this.meshes.filter((t=>{var e;return null==(e=t.material)?void 0:e.name.includes("placeholder")})).map((e=>({id:e.name,textures:{uPlaceholderTexture:new I({source:t})}})))}getDataToUpdateSinglePlaceholder(t,e){if(!this.meshes.find((e=>{var n;return e.name===t&&(null==(n=e.material)?void 0:n.name.includes("placeholder"))})))throw new s("Mesh not found");return{id:t,textures:{uPlaceholderTexture:new I({source:e})}}}},e.OrbitControls=class{constructor(t,{initialDistance:e,minDistance:n,maxDistance:r,initialRotation:i}){if(this.container=t,this.velocity=[0,0],this.cameraPosition=[0,0,0],this.mousePosition=[0,0],this.isMouseDown=!1,this.onMouseDown=t=>{t.preventDefault(),this.mousePosition[0]=t.x,this.mousePosition[1]=t.y,this.isMouseDown=!0},this.onMouseMove=t=>{if(!this.isMouseDown)return;const{x:e,y:n}=t,r=e-this.mousePosition[0],i=n-this.mousePosition[1],o=.3*Math.sqrt(this.distance);this.velocity[0]=r*o,this.velocity[1]=i*o,this.mousePosition[0]=e,this.mousePosition[1]=n,this.tick()},this.onMouseUp=t=>{this.isMouseDown=!1,t.target===this.container&&t.preventDefault()},this.tick=()=>{this.rotation[0]+=.01*this.velocity[0],this.rotation[1]-=.01*this.velocity[1],this.rotation[0]=(this.rotation[0]+2*Math.PI)%(2*Math.PI),this.rotation[1]=Math.min(.99*Math.PI,Math.max(.01,this.rotation[1])),this.velocity[0]*=.95,this.velocity[1]*=.95;const t=this.velocity[0]*this.velocity[0],e=this.velocity[1]*this.velocity[1];return Math.sqrt(t+e)<5e-5&&(this.velocity[0]=0,this.velocity[1]=0),this.updatePosition(),this.cameraPosition},this.moveToRotation=(t,e)=>(null!=t&&(this.rotation[0]=(t+2*Math.PI)%(2*Math.PI)),null!=e&&(this.rotation[1]=Math.min(.99*Math.PI,Math.max(.01,e))),this.velocity[0]=0,this.velocity[1]=0,this.updatePosition(),this.cameraPosition),this.zoomToDistance=t=>{if(null!=t)return this.distance=Math.min(this.maxDistance,Math.max(t,this.minDistance)),this.velocity[0]=0,this.velocity[1]=0,this.updatePosition(),this.cameraPosition},this.checkCamera=()=>this.cameraPosition,void 0!==n&&n<=0)throw new a("Invalid value of minDistance. Expected value must be greater than 0.");this.distance=null!=e?e:1.5,this.minDistance=null!=n?n:.1,this.maxDistance=null!=r?r:20,this.rotation=null!=i?i:[.5*Math.PI,.5*Math.PI],window.addEventListener("mousedown",this.onMouseDown,!1),window.addEventListener("mousemove",this.onMouseMove,!1),window.addEventListener("mouseup",this.onMouseUp,!1),this.updatePosition()}dispose(){window.removeEventListener("mousedown",this.onMouseDown,!1),window.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1)}updatePosition(){const t=this.rotation[0],e=this.rotation[1],n=Math.cos(t)*Math.sin(e),r=Math.cos(e),i=Math.sin(t)*Math.sin(e);this.cameraPosition[0]=n*this.distance,this.cameraPosition[1]=r*this.distance,this.cameraPosition[2]=i*this.distance}},e.PingpongBuffers=tt,e.PremultipliedNormalBlending={source:"one",destination:"one minus src alpha",equation:"add"},e.RenderTexture=B,e.Renderable=S,e.Renderer=class{constructor(t){this.resources=new Map,this.create=t,this.backend=this.createBackend()}createBackend(){const t=this.create();return t.onContextLost=t=>{var e;null==(e=this.onContextLost)||e.call(this,t)},t}load(t){this.backend.load(t);const e=Array.isArray(t)?t:t.resources;for(const n of e)this.resources.set(n.id,n)}update(t){this.backend.update(t)}clear(t,e){this.backend.clear(t,e)}render(t){this.backend.render(t)}readPixels(t){return this.backend.readPixels(t)}flush(){this.backend.flush()}release(t){this.backend.release(t);const e=Array.isArray(t)?t:t.resources;for(const n of e)this.resources.delete(n.id)}dispose(){this.backend.dispose(),this.resources.clear()}restore(){this.backend.dispose(),this.backend=this.createBackend(),this.backend.load(Array.from(this.resources.values()))}resize(...t){const[e,n]=t;if(e===this.canvas.width&&n===this.canvas.height)return;this.backend.resize(...t);const r=Array.from(this.resources.values()).filter((t=>"texture"===t.resourceType&&!t.source&&"relative"===t.size));this.backend.update(r)}get canvas(){return this.backend.canvas}},e.Shader=C,e.WebGlRenderer=X,e.createWebGlRenderer=function(t,e){var n,r,o;const s=document.createElement("canvas");t.append(s),s.style.width="100%",s.style.height="100%";let a="Unknown";const u=t=>{t.statusMessage&&(a=t.statusMessage)};s.addEventListener("webglcontextcreationerror",u);const c={alpha:null==(n=null==e?void 0:e.alpha)||n,antialias:null==(r=null==e?void 0:e.antialias)||r,depth:null!=(o=null==e?void 0:e.depth)&&o,stencil:!1,preserveDrawingBuffer:!(null==e||!e.preserveDrawingBuffer),powerPreference:"high-performance",failIfMajorPerformanceCaveat:!(null==e||!e.failIfMajorPerformanceCaveat)},l=null!=e&&e.useWebGl2?s.getContext("webgl2",c):s.getContext("webgl",c);if(s.removeEventListener("webglcontextcreationerror",u),!l)throw new i(`A WebGL context could not be created. Reason: ${a}`);return new X(l,{...e,onDispose:()=>{s.remove()}})},e.debugBinaryTexture=ut,e.debugImageTexture=at,e.debugRenderTexture=st,e.debugTexture=function(t,e){e&&"render"!==e.textureType?"image"===e.textureType?at(e):ut(e):st(t,e)},e.getAbsoluteTextureSize=M,e.injectAlphaPremultiplication=$,e.paddedTuple=function(t,e,n){if(t.length>n)return t.slice(0,n);const r=[...t];for(;r.length{"use strict";t.exports=n(44080)},968:t=>{var e;window,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=85)}([function(t,e,n){"use strict";n.d(e,"c",(function(){return T})),n.d(e,"b",(function(){return O})),n.d(e,"d",(function(){return R})),n.d(e,"a",(function(){return A}));var r=n(1),i=n.n(r),o=n(10),s=n.n(o),a=n(17),u=n.n(a),c=n(2),l=n(5),f=n(3),h=n(9),p=n(6),d=n(25),y=n(11),v=n(20);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=O(e,r),this.container=this.options.container,null==this.container)return _.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",d.a.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new f.a;var o=this.options.registry.query(c.ScrollBlot.blotName);this.scroll=new o(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new l.a(this.scroll),this.selection=new p.b(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.init(),this.emitter.on(f.a.events.EDITOR_CHANGE,(function(t){t===f.a.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(f.a.events.SCROLL_UPDATE,(function(t,e,r){var i=n.selection.lastRange,o=g(n.selection.getRange(),1)[0],s=i&&o?{oldRange:i,newRange:o}:void 0;x.call(n,(function(){return n.editor.update(null,e,s)}),t),null!=r&&Object.entries(r).forEach((function(t){var e=g(t,2),r=e[0],i=e[1];return n.selection.format(r,i)}))}));var s=this.clipboard.convert({html:"".concat(i,"


"),text:"\n"});this.setContents(s),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}var e,n,r;return e=t,n=[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,i=g(R(t,e,n),4);return t=i[0],e=i[1],n=i[3],x.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"editReadOnly",value:function(t){this.allowReadOnlyEdits=!0;var e=t();return this.allowReadOnlyEdits=!1,e}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.a.sources.API;return x.call(this,(function(){var r=n.getSelection(!0),o=new i.a;if(null==r)return o;if(n.scroll.query(t,c.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,b({},t,e));else{if(0===r.length)return n.selection.format(t,e),o;o=n.editor.formatText(r.index,r.length,b({},t,e))}return n.setSelection(r,f.a.sources.SILENT),o}),r)}},{key:"formatLine",value:function(t,e,n,r,i){var o,s=this,a=g(R(t,e,n,r,i),4);return t=a[0],e=a[1],o=a[2],i=a[3],x.call(this,(function(){return s.editor.formatLine(t,e,o)}),i,t,0)}},{key:"formatText",value:function(t,e,n,r,i){var o,s=this,a=g(R(t,e,n,r,i),4);return t=a[0],e=a[1],o=a[2],i=a[3],x.call(this,(function(){return s.editor.formatText(t,e,o)}),i,t,0)}},{key:"getBounds",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(e="number"==typeof t?this.selection.getBounds(t,n):this.selection.getBounds(t.index,t.length)))return null;var r=this.container.getBoundingClientRect();return{bottom:e.bottom-r.top,height:e.height,left:e.left-r.left,right:e.right-r.left,top:e.top-r.top,width:e.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=g(R(t,e),2);return t=n[0],e=n[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getSemanticHTML",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=g(R(t,e),2);return t=n[0],e=n[1],this.editor.getHTML(t,e)}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=g(R(t,e),2);return t=n[0],e=n[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return x.call(this,(function(){return i.editor.insertEmbed(e,n,r)}),o,e)}},{key:"insertText",value:function(t,e,n,r,i){var o,s=this,a=g(R(t,0,n,r,i),4);return t=a[0],o=a[2],i=a[3],x.call(this,(function(){return s.editor.insertText(t,e,o)}),i,t,e.length)}},{key:"isEnabled",value:function(){return this.scroll.isEnabled()}},{key:"off",value:function(){var t;return(t=this.emitter).off.apply(t,arguments)}},{key:"on",value:function(){var t;return(t=this.emitter).on.apply(t,arguments)}},{key:"once",value:function(){var t;return(t=this.emitter).once.apply(t,arguments)}},{key:"removeFormat",value:function(t,e,n){var r=this,i=g(R(t,e,n),4);return t=i[0],e=i[1],n=i[3],x.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.a.sources.API;return x.call(this,(function(){t=new i.a(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),s=e.editor.deleteText(e.getLength()-1,1);return r.compose(o).compose(s)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=g(R(e,n,r),4);e=i[0],n=i[1],r=i[3],this.selection.setRange(new p.a(Math.max(0,e),n),r),r!==f.a.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.a.sources.API,n=(new i.a).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.a.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.a.sources.API;return x.call(this,(function(){return t=new i.a(t),e.editor.applyDelta(t,n)}),n,!0)}}],r=[{key:"debug",value:function(t){!0===t&&(t="log"),y.a.level(t)}},{key:"find",value:function(t){return d.a.get(t)||T.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&_.error("Cannot import ".concat(t,". Are you sure it was registered?")),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/".concat(i),t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||_.warn("Overwriting ".concat(t," with"),e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName&&T.register(e),"function"==typeof e.register&&e.register(T)}}],n&&w(e.prototype,n),r&&w(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function O(t,e){if((e=u()({container:t,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0}},e)).theme&&e.theme!==A.DEFAULTS.theme){if(e.theme=A.import("themes/".concat(e.theme)),null==e.theme)throw new Error("Invalid theme ".concat(e.theme,". Did you register it?"))}else e.theme=v.a;var n=s()(e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=A.import("modules/".concat(e));return null==n?_.error("Cannot load ".concat(e," module. Are you sure you registered it?")):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=u()({},A.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function x(t,e,n,r){if(!this.isEnabled()&&e===f.a.sources.USER&&!this.allowReadOnlyEdits)return new i.a;var o=null==n?null:this.getSelection(),s=this.editor.delta,a=t();if(null!=o&&(!0===n&&(n=o.index),null==r?o=N(o,a,e):0!==r&&(o=N(o,n,r,e)),this.setSelection(o,f.a.sources.SILENT)),a.length()>0){var u,c,l=[f.a.events.TEXT_CHANGE,a,s,e];(u=this.emitter).emit.apply(u,[f.a.events.EDITOR_CHANGE].concat(l)),e!==f.a.sources.SILENT&&(c=this.emitter).emit.apply(c,l)}return a}function R(t,e,n,r,i){var o={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=r,r=n,n=e,e=0),"object"===m(n)?(o=n,i=r):"string"==typeof n&&(null!=r?o[n]=r:i=n),[t,e,o,i=i||f.a.sources.API]}function N(t,e,n,r){if(null==t)return null;var o,s;if(e instanceof i.a){var a=g([t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==f.a.sources.USER)})),2);o=a[0],s=a[1]}else{var u=g([t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),2);o=u[0],s=u[1]}return new p.a(o,s-o)}A.DEFAULTS={bounds:null,modules:{},placeholder:"",readOnly:!1,registry:T,scrollingContainer:null,theme:"default"},A.events=f.a.events,A.sources=f.a.sources,A.version="2.0.0-dev.46",A.imports={delta:i.a,parchment:c,"core/module":h.a,"core/theme":v.a}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=r(n(50)),o=r(n(10)),s=r(n(18)),a=r(n(51)),u=r(n(42)),c=String.fromCharCode(0),l=function(){function t(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return t.prototype.insert=function(t,e){var n={};return"string"==typeof t&&0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},t.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},t.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},t.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o.default(t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(s.default(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},t.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},t.prototype.filter=function(t){return this.ops.filter(t)},t.prototype.forEach=function(t){this.ops.forEach(t)},t.prototype.map=function(t){return this.ops.map(t)},t.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},t.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},t.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+u.default.length(e):e.delete?t-e.delete:t}),0)},t.prototype.length=function(){return this.reduce((function(t,e){return t+u.default.length(e)}),0)},t.prototype.slice=function(e,n){void 0===e&&(e=0),void 0===n&&(n=1/0);for(var r=[],i=u.default.iterator(this.ops),o=0;o0&&r.next(o.retain-c)}for(var l=new t(i);n.hasNext()||r.hasNext();)if("insert"===r.peekType())l.push(r.next());else if("delete"===n.peekType())l.push(n.next());else{var f=Math.min(n.peekLength(),r.peekLength()),h=n.next(f),p=r.next(f);if("number"==typeof p.retain){var d={};"number"==typeof h.retain?d.retain=f:d.insert=h.insert;var y=a.default.compose(h.attributes,p.attributes,"number"==typeof h.retain);if(y&&(d.attributes=y),l.push(d),!r.hasNext()&&s.default(l.ops[l.ops.length-1],d)){var v=new t(n.rest());return l.concat(v).chop()}}else"number"==typeof p.delete&&"number"==typeof h.retain&&l.push(p)}return l.chop()},t.prototype.concat=function(e){var n=new t(this.ops.slice());return e.ops.length>0&&(n.push(e.ops[0]),n.ops=n.ops.concat(e.ops.slice(1))),n},t.prototype.diff=function(e,n){if(this.ops===e.ops)return new t;var r=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:c;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),o=new t,l=i.default(r[0],r[1],n),f=u.default.iterator(this.ops),h=u.default.iterator(e.ops);return l.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.default.INSERT:n=Math.min(h.peekLength(),e),o.push(h.next(n));break;case i.default.DELETE:n=Math.min(e,f.peekLength()),f.next(n),o.delete(n);break;case i.default.EQUAL:n=Math.min(f.peekLength(),h.peekLength(),e);var r=f.next(n),u=h.next(n);s.default(r.insert,u.insert)?o.retain(n,a.default.diff(r.attributes,u.attributes)):o.push(u).delete(n)}e-=n}})),o.chop()},t.prototype.eachLine=function(e,n){void 0===n&&(n="\n");for(var r=u.default.iterator(this.ops),i=new t,o=0;r.hasNext();){if("insert"!==r.peekType())return;var s=r.peek(),a=u.default.length(s)-r.peekLength(),c="string"==typeof s.insert?s.insert.indexOf(n,a)-a:-1;if(c<0)i.push(r.next());else if(c>0)i.push(r.next(c));else{if(!1===e(i,r.next(1).attributes||{},o))return;o+=1,i=new t}}i.length()>0&&e(i,{},o)},t.prototype.invert=function(e){var n=new t;return this.reduce((function(t,r){if(r.insert)n.delete(u.default.length(r));else{if(r.retain&&null==r.attributes)return n.retain(r.retain),t+r.retain;if(r.delete||r.retain&&r.attributes){var i=r.delete||r.retain;return e.slice(t,t+i).forEach((function(t){r.delete?n.push(t):r.retain&&r.attributes&&n.retain(u.default.length(t),a.default.invert(r.attributes,t.attributes))})),t+i}}return t}),0),n.chop()},t.prototype.transform=function(e,n){if(void 0===n&&(n=!1),n=!!n,"number"==typeof e)return this.transformPosition(e,n);for(var r=e,i=u.default.iterator(this.ops),o=u.default.iterator(r.ops),s=new t;i.hasNext()||o.hasNext();)if("insert"!==i.peekType()||!n&&"insert"===o.peekType())if("insert"===o.peekType())s.push(o.next());else{var c=Math.min(i.peekLength(),o.peekLength()),l=i.next(c),f=o.next(c);if(l.delete)continue;f.delete?s.push(f):s.retain(c,a.default.transform(l.attributes,f.attributes,n))}else s.retain(u.default.length(i.next()));return s.chop()},t.prototype.transformPosition=function(t,e){void 0===e&&(e=!1),e=!!e;for(var n=u.default.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r1){var n=t.slice(1);this.append.apply(this,n)}},t.prototype.at=function(t){for(var e=this.iterator(),n=e();n&&t>0;)t-=1,n=e();return n},t.prototype.contains=function(t){for(var e=this.iterator(),n=e();n;){if(n===t)return!0;n=e()}return!1},t.prototype.indexOf=function(t){for(var e=this.iterator(),n=e(),r=0;n;){if(n===t)return r;r+=1,n=e()}return-1},t.prototype.insertBefore=function(t,e){null!=t&&t!==e&&(this.remove(t),t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n=this.iterator(),r=n();r;){var i=r.length();if(to?n(a,t-o,Math.min(e,o+u-t)):n(a,0,Math.min(u,t+e-o)),o+=u,a=s()}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n=this.iterator(),r=n();r;)e=t(e,r),r=n();return e},t}(),u=a,c=(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},o(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return c(e,t),e}(Error),f=function(){function t(){this.attributes={},this.classes={},this.tags={},this.types={}}return t.find=function(t,e){return void 0===e&&(e=!1),null==t?null:this.blots.has(t)?this.blots.get(t)||null:e?this.find(t.parentNode,e):null},t.prototype.create=function(e,n,r){var i=this.query(n);if(null==i)throw new l("Unable to create "+n+" blot");var o=i,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:o.create(r),a=new o(e,s,r);return t.blots.set(a.domNode,a),a},t.prototype.find=function(e,n){return void 0===n&&(n=!1),t.find(e,n)},t.prototype.query=function(t,e){var n,r=this;return void 0===e&&(e=s.ANY),"string"==typeof t?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof t?t&s.LEVEL&s.BLOCK?n=this.types.block:t&s.LEVEL&s.INLINE&&(n=this.types.inline):t instanceof HTMLElement&&((t.getAttribute("class")||"").split(/\s+/).some((function(t){return!!(n=r.classes[t])})),n=n||this.tags[t.tagName]),null==n?null:e&s.LEVEL&n.scope&&e&s.TYPE&n.scope?n:null},t.prototype.register=function(){for(var t=this,e=[],n=0;n1)return e.map((function(e){return t.register(e)}));var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new l("Invalid definition");if("abstract"===r.blotName)throw new l("Cannot register abstract class");return this.types[r.blotName||r.attrName]=r,"string"==typeof r.keyName?this.attributes[r.keyName]=r:(null!=r.className&&(this.classes[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(e){null!=t.tags[e]&&null!=r.className||(t.tags[e]=r)})))),r},t.blots=new WeakMap,t}(),h=f,p=function(){function t(t,e){this.scroll=t,this.domNode=e,h.blots.set(e,this),this.prev=null,this.next=null}return t.create=function(t){if(null==this.tagName)throw new l("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t,10).toString()===t&&(t=parseInt(t,10))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!1,configurable:!0}),t.prototype.attach=function(){},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return this.scroll.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),h.blots.delete(this.domNode)},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var i=this.isolate(t,e);if(null!=this.scroll.query(n,s.BLOT)&&r)i.wrap(n,r);else if(null!=this.scroll.query(n,s.ATTRIBUTE)){var o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?this.scroll.create("text",e):this.scroll.create(e,n),i=this.split(t);this.parent.insertBefore(r,i||void 0)},t.prototype.isolate=function(t,e){var n=this.split(t);if(null==n)throw new Error("Attempt to isolate at end");return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){!this.statics.requiredContainer||this.parent instanceof this.statics.requiredContainer||this.wrap(this.statics.requiredContainer.blotName)},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?this.scroll.create(t,e):t;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?this.scroll.create(t,e):t;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new l("Cannot wrap "+t);return n.appendChild(this),n},t.blotName="abstract",t}(),d=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function y(t,e){var n=e.find(t);if(null==n)try{n=e.create(t)}catch(r){n=e.create(s.INLINE),Array.from(t.childNodes).forEach((function(t){n.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(n.domNode,t),n.attach()}return n}var v=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.uiNode=null,r.build(),r}return d(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.attachUI=function(t){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=t,e.uiClass&&this.uiNode.classList.add(e.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)},e.prototype.build=function(){var t=this;this.children=new u,Array.from(this.domNode.childNodes).filter((function(e){return e!==t.uiNode})).reverse().forEach((function(e){try{var n=y(e,t.scroll);t.insertBefore(n,t.children.head||void 0)}catch(r){if(r instanceof l)return;throw r}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){void 0===n&&(n=0);var r=this.children.find(n),i=r[0],o=r[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,o]:i instanceof e?i.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,(function(n,r,s){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,r,o))),o-=s})),i},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.enforceAllowedChildren=function(){var t=this,n=!1;this.children.forEach((function(r){n||t.statics.allowedChildren.some((function(t){return r instanceof t}))||(r.statics.scope===s.BLOCK_BLOT?(null!=r.next&&t.splitAfter(r),null!=r.prev&&t.splitAfter(r.prev),r.parent.unwrap(),n=!0):r instanceof e?r.unwrap():r.remove())}))},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),i=r[0],o=r[1];if(i)i.insertAt(o,e,n);else{var s=null==n?this.scroll.create("text",e):this.scroll.create(e,n);this.appendChild(s)}},e.prototype.insertBefore=function(t,e){if(t!==e){null!=t.parent&&t.parent.children.remove(t);var n=null;this.children.insertBefore(t,e||null),t.parent=this,null!=e&&(n=e.domNode),t.domNode.parentNode===this.domNode&&t.domNode.nextSibling===n||this.domNode.insertBefore(t.domNode,n),t.attach()}},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){var n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),i=r[0],o=r[1],s=[[this,t]];return i instanceof e?s.concat(i.path(o,n)):(null!=i&&s.push([i,o]),s)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replaceWith=function(n,r){var i="string"==typeof n?this.scroll.create(n,r):n;return i instanceof e&&this.moveChildren(i),t.prototype.replaceWith.call(this,i)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),(function(t,r,i){var o=t.split(r,e);null!=o&&n.appendChild(o)})),n},e.prototype.splitAfter=function(t){for(var e=this.clone();null!=t.next;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e},e.prototype.unwrap=function(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],i=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),i.push.apply(i,t.removedNodes))})),i.forEach((function(t){if(null==t.parentNode||t instanceof Element&&("IFRAME"===t.tagName||null!=t.querySelector("iframe"))||!(document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=n.scroll.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),r.filter((function(t){return t.parentNode===n.domNode||t===n.uiNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=n.scroll.find(t.nextSibling));var r=y(t,n.scroll);r.next===e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))})),this.enforceAllowedChildren()},e.uiClass="",e}(p),m=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.checkMerge=function(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName},e.prototype.deleteAt=function(e,n){t.prototype.deleteAt.call(this,e,n),this.enforceAllowedChildren()},e.prototype.formatAt=function(e,n,r,i){t.prototype.formatAt.call(this,e,n,r,i),this.enforceAllowedChildren()},e.prototype.insertAt=function(e,n,r){t.prototype.insertAt.call(this,e,n,r),this.enforceAllowedChildren()},e.prototype.optimize=function(e){t.prototype.optimize.call(this,e),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())},e.blotName="container",e.scope=s.BLOCK_BLOT,e}(v),g=b,E=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return E(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=s.INLINE_BLOT,e}(p),_=w,T=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=s.TYPE&s.ATTRIBUTE;this.scope=null!=n.scope?n.scope&s.LEVEL|r:s.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return Array.from(t.attributes).map((function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1)},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}(),A=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function O(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}var x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return A(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){O(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(O(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(T),R=x,N=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return N(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style.setProperty(this.keyName,e),!0)},e.prototype.remove=function(t){t.style.removeProperty(this.keyName),t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style.getPropertyValue(this.keyName).trim();return this.canAdd(t,e)?e:""},e}(T),P=S,C=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=h.find(this.domNode);if(null!=e){var n=T.keys(this.domNode),r=R.keys(this.domNode),i=P.keys(this.domNode);n.concat(r).concat(i).forEach((function(n){var r=e.scroll.query(n,s.ATTRIBUTE);r instanceof T&&(t.attributes[r.attrName]=r)}))}},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}(),L=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.attributes=new C(r.domNode),r}return L(e,t),e.formats=function(t,n){var r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName)return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,n){var r=this;if(t!==this.statics.blotName||n){var i=this.scroll.query(t,s.INLINE);if(null==i)return;i instanceof T?this.attributes.attribute(i,n):!n||t===this.statics.blotName&&this.formats()[t]===n||this.replaceWith(t,n)}else this.children.forEach((function(t){t instanceof e||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap()},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.formatAt=function(e,n,r,i){null!=this.formats()[r]||this.scroll.query(r,s.ATTRIBUTE)?this.isolate(e,n).format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var i=t.prototype.wrap.call(this,n,r);return i instanceof e&&this.attributes.move(i),i},e.allowedChildren=[e,_],e.blotName="inline",e.scope=s.INLINE_BLOT,e.tagName="SPAN",e}(v),I=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.attributes=new C(r.domNode),r}return I(e,t),e.formats=function(t,n){var r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName)return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,n){var r=this.scroll.query(t,s.BLOCK);null!=r&&(r instanceof T?this.attributes.attribute(r,n):t!==this.statics.blotName||n?!n||t===this.statics.blotName&&this.formats()[t]===n||this.replaceWith(t,n):this.replaceWith(e.blotName))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.formatAt=function(e,n,r,i){null!=this.scroll.query(r,s.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=this.scroll.query(n,s.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e);if(null==i)throw new Error("Attempt to insertAt after block boundaries");var o=this.scroll.create(n,r);i.parent.insertBefore(o,i)}},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.blotName="block",e.scope=s.BLOCK_BLOT,e.tagName="P",e.allowedChildren=[k,e,_],e}(v),B=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.formats=function(t,e){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode,this.scroll)},e}(_),D=M,F=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},H=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.registry=e,r.scroll=r,r.build(),r.observer=new MutationObserver((function(t){r.update(t)})),r.observer.observe(r.domNode,U),r.attach(),r}return F(e,t),e.prototype.create=function(t,e){return this.registry.create(this,t,e)},e.prototype.find=function(t,e){void 0===e&&(e=!1);var n=this.registry.find(t,e);return n?n.scroll===this?n:e?this.find(n.scroll.domNode.parentNode,!0):null:null},e.prototype.query=function(t,e){return void 0===e&&(e=s.ANY),this.registry.query(t,e)},e.prototype.register=function(){for(var t,e=[],n=0;n0;)e.push(o.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(i.has(t.domNode)||i.set(t.domNode,[]),e&&s(t.parent))},a=function(t){i.has(t.domNode)&&(t instanceof v&&t.children.forEach(a),i.delete(t.domNode),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=r.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(r.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((function(t){var e=r.find(t,!1);s(e,!1),e instanceof v&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(a),o=(u=Array.from(this.observer.takeRecords())).slice();o.length>0;)e.push(o.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),e=e||this.observer.takeRecords();var i=new WeakMap;e.map((function(t){var e=r.find(t.target,!0);return null==e?null:i.has(e.domNode)?(i.get(e.domNode).push(t),null):(i.set(e.domNode,[t]),e)})).forEach((function(t){null!=t&&t!==r&&i.has(t.domNode)&&t.update(i.get(t.domNode)||[],n)})),n.mutationsMap=i,i.has(this.domNode)&&t.prototype.update.call(this,i.get(this.domNode),n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild=j,e.allowedChildren=[j,g],e.scope=s.BLOCK_BLOT,e.tagName="DIV",e}(v),G=H,V=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),q=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.text=r.statics.value(r.domNode),r}return V(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){return t.data},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=s.INLINE_BLOT,e}(_)},function(t,e,n){"use strict";var r=n(43),i=n.n(r),o=n(25),s=n(11);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){for(var n=0;n1?e-1:0),r=1;r0&&(t1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=v(E(n.prototype),"split",this).call(this,t,e);return this.cache={},i}}]),n}(o.BlockBlot);w.blotName="block",w.tagName="P",w.defaultChild=s.a,w.allowedChildren=[s.a,a.a,o.EmbedBlot,u.a];var _=function(t){m(n,t);var e=g(n);function n(){return p(this,n),e.apply(this,arguments)}return y(n,[{key:"attach",value:function(){v(E(n.prototype),"attach",this).call(this),this.attributes=new o.AttributorStore(this.domNode)}},{key:"delta",value:function(){return(new i.a).insert(this.value(),f(f({},this.formats()),this.attributes.values()))}},{key:"format",value:function(t,e){var n=this.scroll.query(t,o.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,e,r){if("string"==typeof e&&e.endsWith("\n")){var i=this.scroll.create(w.blotName);this.parent.insertBefore(i,0===t?this:this.next),i.insertAt(0,e.slice(0,-1))}else v(E(n.prototype),"insertAt",this).call(this,t,e,r)}}]),n}(o.EmbedBlot);function T(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(o.LeafBlot).reduce((function(t,n){return 0===n.length()?t:t.insert(n.value(),A(n,{},e))}),new i.a).insert("\n",A(t))}function A(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("function"==typeof t.formats&&(e=f(f({},e),t.formats()),n&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:A(t.parent,e,n))}_.scope=o.Scope.BLOCK_BLOT},function(t,e,n){"use strict";var r=n(10),i=n.n(r),o=n(18),s=n.n(o),a=n(17),u=n.n(a),c=n(1),l=n.n(c),f=n(2),h=n(6),p=n(16),d=n(4),y=n(8),v=n(7);function m(t){return x(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(t)||T()}function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach((function(i){n.scroll.lines(t,Math.max(e,1)).forEach((function(t){t.format(i,r[i])}))})),this.scroll.optimize();var o=(new l.a).retain(t).retain(e,i()(r));return this.update(o)}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e,i,r[i])}));var o=(new l.a).retain(t).retain(e,i()(r));return this.update(o)}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new l.a)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=_(t,1)[0];e instanceof d.d?n.push(e):e instanceof f.LeafBlot&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(f.LeafBlot,t,e));var i=_([n,r].map((function(t){if(0===t.length)return{};for(var e=Object(d.c)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=L(Object(d.c)(n),e)}return e})),2);return n=i[0],r=i[1],g(g({},n),r)}},{key:"getHTML",value:function(t,e){var n=_(this.scroll.line(t),2),r=n[0],i=n[1];return r.length()>=i+e?C(r,i,e,!0):C(this.scroll,t,e,!0)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new l.a).retain(t).insert(E({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e.length,i,r[i])})),this.update((new l.a).retain(t).insert(e,i()(r)))}},{key:"isBlank",value:function(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===d.d.blotName&&!(t.children.length>1)&&t.children.head instanceof y.a}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=_(this.scroll.line(t+e),2),i=r[0],o=r[1],s=0,a=new l.a;null!=i&&(s=i.length()-o,a=i.delta().slice(o,o+s-1).insert("\n"));var u=this.getContents(t,e+s).diff((new l.a).insert(n).concat(a)),c=(new l.a).retain(t).concat(u);return this.applyDelta(c)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(N)&&this.scroll.find(e[0].target)){var i=this.scroll.find(e[0].target),o=Object(d.c)(i),a=i.offset(this.scroll),u=e[0].oldValue.replace(p.a.CONTENTS,""),c=(new l.a).insert(u),f=(new l.a).insert(i.value()),h=n&&{oldRange:I(n.oldRange,-a),newRange:I(n.newRange,-a)};t=(new l.a).retain(a).concat(c.diff(f,h)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new l.a),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&s()(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}],n&&R(e.prototype,n),r&&R(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function P(t,e,n){if(0===t.length){var r=_(k(n.pop()),1)[0];return e<=0?""):"").concat(P([],e-1,n))}var i=m(t),o=i[0],s=o.child,a=o.offset,u=o.length,c=o.indent,l=o.type,f=i.slice(1),h=_(k(l),2),p=h[0],d=h[1];if(c>e)return n.push(l),c===e+1?"<".concat(p,">").concat(C(s,a,u)).concat(P(f,c,n)):"<".concat(p,">
  • ").concat(P(t,e+1,n));var y=n[n.length-1];if(c===e&&l===y)return"
  • ").concat(C(s,a,u)).concat(P(f,c,n));var v=_(k(n.pop()),1)[0];return"").concat(P(t,e-1,n))}function C(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"==typeof t.html)return t.html(e,n);if(t instanceof v.a)return Object(v.b)(t.value().slice(e,e+n));if(t.children){if("list-container"===t.statics.blotName){var i=[];return t.children.forEachAt(e,n,(function(t,e,n){var r=t.formats();i.push({child:t,offset:e,length:n,indent:r.indent||(r["list-level"]?r["list-level"]-1:0),type:r.list})})),P(i,-1,[])}var o=[];if(t.children.forEachAt(e,n,(function(t,e,n){o.push(C(t,e,n))})),r||"list"===t.statics.blotName)return o.join("");var s=t.domNode,a=s.outerHTML,u=s.innerHTML,c=_(a.split(">".concat(u,"<")),2),l=c[0],f=c[1];return"'.concat(o.join(""),"<").concat(f):"".concat(l,">").concat(o.join(""),"<").concat(f)}return t.domNode.outerHTML}function L(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}function k(t){var e="ordered"===t?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function I(t,e){var n=t.index,r=t.length;return new h.a(n+e,r)}e.a=S},function(t,e,n){"use strict";n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return g}));var r=n(2),i=n(10),o=n.n(i),s=n(18),a=n.n(s),u=n(3),c=n(11);function l(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||h(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){if(t){if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:0;v(this,t),this.index=e,this.length=n})),g=function(){function t(e,n){var r=this;v(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new b(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,u.a.sources.USER),1)})),this.emitter.on(u.a.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(u.a.events.SCROLL_UPDATE,(function(){try{r.root.contains(t.start.node)&&r.root.contains(t.end.node)&&r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset),r.update(u.a.sources.SILENT)}catch(e){}}))}})),this.emitter.on(u.a.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,o=n.startOffset,s=n.endNode,a=n.endOffset;r.setNativeRange(i,o,s,a),r.update(u.a.sources.SILENT)}})),this.update(u.a.sources.SILENT)}return y(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(u.a.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(t,r.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=this.scroll.find(n.start.node,!1);if(null==i)return;if(i instanceof r.LeafBlot){var o=i.split(n.start.offset);i.parent.insertBefore(this.cursor,o)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}},{key:"getBounds",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.scroll.length();t=Math.min(t,r-1),n=Math.min(t+n,r-1)-t;var i=f(this.scroll.leaf(t),2),o=i[0],s=i[1];if(null==o)return null;var a=f(o.position(s,!0),2);e=a[0],s=a[1];var u=document.createRange();if(n>0){u.setStart(e,s);var c=f(this.scroll.leaf(t+n),2);if(o=c[0],s=c[1],null==o)return null;var l=f(o.position(s,!0),2);return e=l[0],s=l[1],u.setEnd(e,s),u.getBoundingClientRect()}var h,p="left";if(e instanceof Text){if(!e.data.length)return null;s0&&(p="right");return{bottom:h.top+h.height,height:h.height,left:h[p],right:h[p],top:h.top,width:0}}},{key:"getNativeRange",value:function(){var t,e=document.getSelection();if(null==e||e.rangeCount<=0)return null;try{t=e.getRangeAt(0)}catch(r){return null}if(null==t)return null;var n=this.normalizeNative(t);return m.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root||E(this.scroll,document.activeElement)}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map((function(t){var n=f(t,2),i=n[0],o=n[1],s=e.scroll.find(i,!0),a=s.offset(e.scroll);return 0===o?a:s instanceof r.ContainerBlot?a+s.length():a+s.index(i,o)})),o=Math.min(Math.max.apply(Math,l(i)),this.scroll.length()-1),s=Math.min.apply(Math,[o].concat(l(i)));return new b(s,o-s)}},{key:"normalizeNative",value:function(t){if(!E(this.scroll,t.startContainer)||!t.collapsed&&!E(this.scroll,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length>0?e.childNodes.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],i=this.scroll.length();return n.forEach((function(t,n){t=Math.min(i-1,t);var o=f(e.scroll.leaf(t),2),s=o[0],a=o[1],u=f(s.position(a,0!==n),2),c=u[0],l=u[1];r.push(c,l)})),r.length<2?r.concat(r):r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,i=f(this.scroll.line(Math.min(e.index,r)),1)[0],o=i;if(e.length>0&&(o=f(this.scroll.line(Math.min(e.index+e.length,r)),1)[0]),null!=i&&null!=o){var s=t.getBoundingClientRect();n.tops.bottom&&(t.scrollTop+=n.bottom-s.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(m.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||i||t!==s.startContainer||e!==s.startOffset||n!==s.endContainer||r!==s.endOffset){"BR"===t.tagName&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),"BR"===n.tagName&&(r=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,r),o.removeAllRanges(),o.addRange(a)}}else o.removeAllRanges(),this.root.blur()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.a.sources.API;if("string"==typeof e&&(n=e,e=!1),m.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,l(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.a.sources.USER,e=this.lastRange,n=f(this.getRange(),2),r=n[0],i=n[1];if(this.lastRange=r,this.lastNative=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!a()(e,this.lastRange)){var s;if(!this.composing&&null!=i&&i.native.collapsed&&i.start.node!==this.cursor.textNode){var c=this.cursor.restore();c&&this.setNativeRange(c.startNode,c.startOffset,c.endNode,c.endOffset)}var l,h=[u.a.events.SELECTION_CHANGE,o()(this.lastRange),o()(e),t];(s=this.emitter).emit.apply(s,[u.a.events.EDITOR_CHANGE].concat(h)),t!==u.a.sources.SILENT&&(l=this.emitter).emit.apply(l,h)}}}]),t}();function E(t,e){try{e.parentNode}catch(r){return!1}if(!t.domNode.contains(e))return!1;var n=t.registry.find(e,!0);return n&&n.scroll===t}},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n"']/g,(function(t){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[t]}))}},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n}));o.DEFAULTS={},e.a=o},function(t,e,n){(function(t,n){var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Boolean]",a="[object Date]",u="[object Function]",c="[object GeneratorFunction]",l="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",d="[object RegExp]",y="[object Set]",v="[object String]",m="[object Symbol]",b="[object WeakMap]",g="[object ArrayBuffer]",E="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",T="[object Int8Array]",A="[object Int16Array]",O="[object Int32Array]",x="[object Uint8Array]",R="[object Uint8ClampedArray]",N="[object Uint16Array]",S="[object Uint32Array]",P=/\w*$/,C=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,k={};k[o]=k["[object Array]"]=k[g]=k[E]=k[s]=k[a]=k[w]=k[_]=k[T]=k[A]=k[O]=k[l]=k[f]=k[h]=k[d]=k[y]=k[v]=k[m]=k[x]=k[R]=k[N]=k[S]=!0,k["[object Error]"]=k[u]=k[b]=!1;var I="object"==typeof t&&t&&t.Object===Object&&t,j="object"==typeof self&&self&&self.Object===Object&&self,B=I||j||Function("return this")(),M=e&&!e.nodeType&&e,D=M&&"object"==typeof n&&n&&!n.nodeType&&n,F=D&&D.exports===M;function U(t,e){return t.set(e[0],e[1]),t}function H(t,e){return t.add(e),t}function G(t,e,n,r){var i=-1,o=t?t.length:0;for(r&&o&&(n=t[++i]);++i-1},Rt.prototype.set=function(t,e){var n=this.__data__,r=Lt(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},Nt.prototype.clear=function(){this.__data__={hash:new xt,map:new(dt||Rt),string:new xt}},Nt.prototype.delete=function(t){return Mt(this,t).delete(t)},Nt.prototype.get=function(t){return Mt(this,t).get(t)},Nt.prototype.has=function(t){return Mt(this,t).has(t)},Nt.prototype.set=function(t,e){return Mt(this,t).set(t,e),this},St.prototype.clear=function(){this.__data__=new Rt},St.prototype.delete=function(t){return this.__data__.delete(t)},St.prototype.get=function(t){return this.__data__.get(t)},St.prototype.has=function(t){return this.__data__.has(t)},St.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Rt){var r=n.__data__;if(!dt||r.length<199)return r.push([t,e]),this;n=this.__data__=new Nt(r)}return n.set(t,e),this};var Ft=lt?z(lt,Object):function(){return[]},Ut=function(t){return et.call(t)};function Ht(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||L.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=i}(t.length)&&!Kt(t)}var Xt=ft||function(){return!1};function Kt(t){var e=Zt(t)?et.call(t):"";return e==u||e==c}function Zt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Yt(t){return Wt(t)?Pt(t):function(t){if(!Gt(t))return ht(t);var e=[];for(var n in Object(t))tt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}n.exports=function(t){return kt(t,!0,!0)}}).call(this,n(39),n(40)(t))},function(t,e,n){"use strict";var r=["error","warn","log","info"],i="warn";function o(t){if(r.indexOf(t)<=r.indexOf(i)){for(var e,n=arguments.length,o=new Array(n>1?n-1:0),s=1;s=0||r>=0?n-r:t===e?0:t0){var e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}])&&a(e.prototype,n),i&&a(e,i),Object.defineProperty(e,"prototype",{writable:!1}),s}(r.InlineBlot);h.allowedChildren=[h,i.a,r.EmbedBlot,o.a],h.order=["cursor","inline","link","underline","strike","italic","bold","script","code"],e.a=h},function(t,e,n){"use strict";n.d(e,"a",(function(){return w})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return E}));var r=n(4),i=n(8),o=n(16),s=n(12),a=n(7),u=n(15),c=n(0);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n\n".concat(Object(a.b)(this.code(t,e)),"\n")}}],[{key:"create",value:function(t){var e=d(b(n),"create",this).call(this,t);return e.setAttribute("spellcheck",!1),e}}]),n}(u.a),E=function(t){y(n,t);var e=m(n);function n(){return f(this,n),e.apply(this,arguments)}return p(n,null,[{key:"register",value:function(){c.a.register(g)}}]),n}(r.d),w=function(t){y(n,t);var e=m(n);function n(){return f(this,n),e.apply(this,arguments)}return p(n)}(s.a);w.blotName="code",w.tagName="CODE",E.blotName="code-block",E.className="ql-code-block",E.tagName="DIV",g.blotName="code-block-container",g.className="ql-code-block-container",g.tagName="DIV",g.allowedChildren=[E],E.allowedChildren=[a.a,i.a,o.a],E.requiredContainer=g,E.TAB=" "},function(t,e,n){"use strict";var r=n(2),i=n(3),o=n(4),s=n(8),a=n(15),u=n(32);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0){if(r instanceof o.a||a instanceof o.a)return void this.optimize();var u=a.children.head instanceof s.a?null:a.children.head;r.moveChildren(a,u),r.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,e,n,r){p(v(f.prototype),"formatAt",this).call(this,t,e,n,r),this.optimize()}},{key:"handleDragStart",value:function(t){t.preventDefault()}},{key:"insertAt",value:function(t,e,n){if(t>=this.length())if(null==n||null==this.scroll.query(e,r.Scope.BLOCK)){var i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),null==n&&e.endsWith("\n")?i.insertAt(0,e.slice(0,-1),n):i.insertAt(0,e,n)}else{var o=this.scroll.create(e,n);this.appendChild(o)}else p(v(f.prototype),"insertAt",this).call(this,t,e,n);this.optimize()}},{key:"insertBefore",value:function(t,e){if(t.statics.scope===r.Scope.INLINE_BLOT){var n=this.scroll.create(this.statics.defaultChild.blotName);if(n.appendChild(t),p(v(f.prototype),"insertBefore",this).call(this,n,e),null==this.defaultUpdateAttributes)return;var i=this.defaultUpdateAttributes,o=i.paraAttributes,s=i.charAttributes,a=t.domNode;a.nodeType===Node.TEXT_NODE&&Object.entries(s).forEach((function(t){var e=l(t,2),r=e[0],i=e[1];return n.formatAt(0,a.length,r,i)})),Object.entries(o).forEach((function(t){var e=l(t,2),r=e[0],i=e[1];return n.format(r,i)}))}else p(v(f.prototype),"insertBefore",this).call(this,t,e)}},{key:"isEnabled",value:function(){return"true"===this.domNode.getAttribute("contenteditable")}},{key:"leaf",value:function(t){var e=this.path(t).pop();return e&&e[0]instanceof r.LeafBlot?e:[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(m,t)}},{key:"lines",value:function(){return function t(e,n,i){var o=[],s=i;return e.children.forEachAt(n,i,(function(e,n,i){m(e)?o.push(e):e instanceof r.ContainerBlot&&(o=o.concat(t(e,n,s))),s-=i})),o}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(p(v(f.prototype),"optimize",this).call(this,t,e),t.length>0&&this.emitter.emit(i.a.events.SCROLL_OPTIMIZE,t,e))}},{key:"path",value:function(t){return p(v(f.prototype),"path",this).call(this,t).slice(1)}},{key:"remove",value:function(){}},{key:"update",value:function(t){var e=this;if(!0!==this.batch){var n=i.a.sources.USER;if("string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter((function(t){var n=t.target,r=e.find(n,!0);return r&&r.scroll===e})),1===t.length&&"childList"===t[0].type&&1===t[0].removedNodes.length&&t[0].removedNodes[0].tagName===u.b.tagName&&0===t[0].target.childElementCount){var r=t[0],s=this.registry.find(r.target);if(s instanceof u.a){var a=r.removedNodes[0].cloneNode(!1),c=this.scroll.create(a);return s.appendChild(c),void s.deleteAt(0,c.length())}}t.length>0&&this.emitter.emit(i.a.events.SCROLL_BEFORE_UPDATE,n,t);var l,h=0===this.domNode.childElementCount,d=1===this.domNode.childElementCount&&"BR"===this.domNode.firstElementChild.tagName;if((h||d)&&(l=t.find((function(t){return"childList"===t.type&&t.target===e.domNode&&t.removedNodes.length>0}))),l){var y,m=l.removedNodes[0],b=this.registry.find(m);b&&(b instanceof o.d?y=b.delta():b.children&&b.children.head instanceof o.d&&(y=b.children.head.delta()),y&&y.eachLine((function(t,n){var r=t.ops.length>0&&t.ops[0].attributes||{};return e.defaultUpdateAttributes={charAttributes:r,paraAttributes:n},!1})))}p(v(f.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(i.a.events.SCROLL_UPDATE,n,t,d&&this.defaultUpdateAttributes?this.defaultUpdateAttributes.charAttributes:null),this.defaultUpdateAttributes&&(this.defaultUpdateAttributes=void 0)}}}],n&&h(e.prototype,n),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),f}(r.ScrollBlot);b.blotName="scroll",b.className="ql-editor",b.tagName="DIV",b.defaultChild=o.d,b.allowedChildren=[o.d,o.a,a.a],e.a=b},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n-1},et.prototype.set=function(t,e){var n=this.__data__,r=at(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},nt.prototype.clear=function(){this.size=0,this.__data__={hash:new tt,map:new($||et),string:new tt}},nt.prototype.delete=function(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e},nt.prototype.get=function(t){return bt(this,t).get(t)},nt.prototype.has=function(t){return bt(this,t).has(t)},nt.prototype.set=function(t,e){var n=bt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},rt.prototype.clear=function(){this.__data__=new et,this.size=0},rt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},rt.prototype.get=function(t){return this.__data__.get(t)},rt.prototype.has=function(t){return this.__data__.has(t)},rt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof et){var r=n.__data__;if(!$||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new nt(r)}return n.set(t,e),this.size=n.size,this};var ct,lt=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),s=o.length;s--;){var a=o[ct?s:++r];if(!1===e(i[a],a,i))break}return t};function ft(t){return null==t?void 0===t?h:c:W&&W in Object(t)?function(t){var e=k.call(t,W),n=t[W];try{t[W]=void 0;var r=!0}catch(o){}var i=j.call(t);return r&&(e?t[W]=n:delete t[W]),i}(t):function(t){return j.call(t)}(t)}function ht(t){return Lt(t)&&ft(t)==o}function pt(t){return!(!Ct(t)||function(t){return!!I&&I in t}(t))&&(St(t)?M:p).test(function(t){if(null!=t){try{return L.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t))}function dt(t){if(!Ct(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=wt(t),n=[];for(var r in t)("constructor"!=r||!e&&k.call(t,r))&&n.push(r);return n}function yt(t,e,n,r,i){t!==e&<(e,(function(o,s){if(i||(i=new rt),Ct(o))!function(t,e,n,r,i,o,s){var a=_t(t,n),u=_t(e,n),c=s.get(u);if(c)ot(t,n,c);else{var f,h,p,d,y,v=o?o(a,u,n+"",t,e,s):void 0,m=void 0===v;if(m){var b=xt(u),g=!b&&Nt(u),E=!b&&!g&&kt(u);v=u,b||g||E?xt(a)?v=a:Lt(y=a)&&Rt(y)?v=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n-1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(mt);function At(t,e){return t===e||t!=t&&e!=e}var Ot=ht(function(){return arguments}())?ht:function(t){return Lt(t)&&k.call(t,"callee")&&!q.call(t,"callee")},xt=Array.isArray;function Rt(t){return null!=t&&Pt(t.length)&&!St(t)}var Nt=K||function(){return!1};function St(t){if(!Ct(t))return!1;var e=ft(t);return e==a||e==u||e==s||e==f}function Pt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}function Ct(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Lt(t){return null!=t&&"object"==typeof t}var kt=R?function(t){return function(e){return t(e)}}(R):function(t){return Lt(t)&&Pt(t.length)&&!!y[ft(t)]};function It(t){return Rt(t)?it(t,!0):dt(t)}var jt,Bt=(jt=function(t,e,n){yt(t,e,n)},vt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=jt.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!Ct(n))return!1;var r=typeof e;return!!("number"==r?Rt(n)&&Et(e,n.length):"string"==r&&e in n)&&At(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++nc))return!1;var f=a.get(t);if(f&&a.get(e))return f==e;var h=-1,p=!0,d=n&o?new Rt:void 0;for(a.set(t,e),a.set(e,t);++h-1},Ot.prototype.set=function(t,e){var n=this.__data__,r=Pt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xt.prototype.clear=function(){this.size=0,this.__data__={hash:new At,map:new(ht||Ot),string:new At}},xt.prototype.delete=function(t){var e=Dt(this,t).delete(t);return this.size-=e?1:0,e},xt.prototype.get=function(t){return Dt(this,t).get(t)},xt.prototype.has=function(t){return Dt(this,t).has(t)},xt.prototype.set=function(t,e){var n=Dt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Rt.prototype.add=Rt.prototype.push=function(t){return this.__data__.set(t,r),this},Rt.prototype.has=function(t){return this.__data__.has(t)},Nt.prototype.clear=function(){this.__data__=new Ot,this.size=0},Nt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Nt.prototype.get=function(t){return this.__data__.get(t)},Nt.prototype.has=function(t){return this.__data__.has(t)},Nt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ot){var r=n.__data__;if(!ht||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xt(r)}return n.set(t,e),this.size=n.size,this};var Ut=ut?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n-1&&t%1==0&&t-1&&t%1==0&&t<=s}function Yt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function $t(t){return null!=t&&"object"==typeof t}var Jt=U?function(t){return function(e){return t(e)}}(U):function(t){return $t(t)&&Zt(t.length)&&!!C[Ct(t)]};function Qt(t){return null!=(e=t)&&Zt(e.length)&&!Kt(e)?St(t):jt(t);var e}n.exports=function(t,e){return kt(t,e)}}).call(this,n(39),n(40)(t))},function(t,e,n){"use strict";n.d(e,"b",(function(){return O})),n.d(e,"a",(function(){return A})),n.d(e,"d",(function(){return P})),n.d(e,"c",(function(){return C}));var r=n(10),i=n.n(r),o=n(18),s=n.n(o),a=n(1),u=n.n(a),c=n(2),l=n(0),f=n(11),h=n(9);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=P(t);null!=i?("function"==typeof n&&(n={handler:n}),"function"==typeof r&&(r={handler:r}),(Array.isArray(i.key)?i.key:[i.key]).forEach((function(t){var o=m(m(m({},i),{},{key:t},n),r);e.bindings[o.key]=e.bindings[o.key]||[],e.bindings[o.key].push(o)}))):T.warn("Attempted to add invalid keyboard binding",i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(e){var n="Enter"===e.key&&229===e.which,r=e.isComposing||n;if(!e.defaultPrevented&&!r){var i=(t.bindings[e.key]||[]).concat(t.bindings[e.which]||[]).filter((function(t){return o.match(e,t)}));if(0!==i.length){var a=t.quill.getSelection();if(null!=a&&t.quill.hasFocus()){var u=d(t.quill.getLine(a.index),2),l=u[0],f=u[1],h=d(t.quill.getLeaf(a.index),2),y=h[0],v=h[1],m=d(0===a.length?[y,v]:t.quill.getLeaf(a.index+a.length),2),b=m[0],g=m[1],E=y instanceof c.TextBlot?y.value().slice(0,v):"",w=b instanceof c.TextBlot?b.value().slice(g):"",_={collapsed:0===a.length,empty:0===a.length&&l.length()<=1,format:t.quill.getFormat(a),line:l,offset:f,prefix:E,suffix:w,event:e};i.some((function(e){if(null!=e.collapsed&&e.collapsed!==_.collapsed)return!1;if(null!=e.empty&&e.empty!==_.empty)return!1;if(null!=e.offset&&e.offset!==_.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==_.format[t]})))return!1}else if("object"===p(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=_.format[t]:!1===e.format[t]?null==_.format[t]:s()(e.format[t],_.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(_.prefix)||null!=e.suffix&&!e.suffix.test(_.suffix)||!0===e.handler.call(t,a,_,e))}))&&e.preventDefault()}}}}))}},{key:"handleBackspace",value:function(t,e){var n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(!(0===t.index||this.quill.getLength()<=1)){var r={},i=d(this.quill.getLine(t.index),1)[0],o=(new u.a).retain(t.index-n).delete(n);if(0===e.offset){var s=d(this.quill.getLine(t.index-1),1)[0];if(s&&!("block"===s.statics.blotName&&s.length()<=1)){var c=i.formats(),f=this.quill.getFormat(t.index-1,1);if(r=a.AttributeMap.diff(c,f)||{},Object.keys(r).length>0){var h=(new u.a).retain(t.index+i.length()-2).retain(1,r);o=o.compose(h)}}}this.quill.updateContents(o,l.a.sources.USER),this.quill.focus()}}},{key:"handleDelete",value:function(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},i=d(this.quill.getLine(t.index),1)[0],o=(new u.a).retain(t.index).delete(n);if(e.offset>=i.length()-1){var s=d(this.quill.getLine(t.index+1),1)[0];if(s){var c=i.formats(),f=this.quill.getFormat(t.index,1);r=a.AttributeMap.diff(c,f)||{},Object.keys(r).length>0&&(o=o.retain(s.length()-1).retain(1,r))}}this.quill.updateContents(o,l.a.sources.USER),this.quill.focus()}}},{key:"handleDeleteRange",value:function(t){C({range:t,quill:this.quill}),this.quill.focus()}},{key:"handleEnter",value:function(t,e){var n=this,r=Object.keys(e.format).reduce((function(t,r){return n.quill.scroll.query(r,c.Scope.BLOCK)&&!Array.isArray(e.format[r])&&(t[r]=e.format[r]),t}),{}),i=(new u.a).retain(t.index).delete(t.length).insert("\n",r);this.quill.updateContents(i,l.a.sources.USER),this.quill.setSelection(t.index+1,l.a.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"code"!==t&&"link"!==t&&n.quill.format(t,e.format[t],l.a.sources.USER))}))}}],r=[{key:"match",value:function(t,e){return!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&(e.key===t.key||e.key===t.which)}}],n&&g(e.prototype,n),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(h.a);function x(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=this.quill.scroll.query("code-block"),r=0===e.length?this.quill.getLines(e.index,1):this.quill.getLines(e),i=e.index,o=e.length;r.forEach((function(e,r){t?(e.insertAt(0,n.TAB),0===r?i+=n.TAB.length:o+=n.TAB.length):e.domNode.textContent.startsWith(n.TAB)&&(e.deleteAt(0,n.TAB.length),0===r?i-=n.TAB.length:o-=n.TAB.length)})),this.quill.update(l.a.sources.USER),this.quill.setSelection(i,o,l.a.sources.SILENT)}}}function R(t,e){var n;return b(n={key:t,shiftKey:e,altKey:null},"ArrowLeft"===t?"prefix":"suffix",/^$/),b(n,"handler",(function(n){var r=n.index;return"ArrowRight"===t&&(r+=n.length+1),!(d(this.quill.getLeaf(r),1)[0]instanceof c.EmbedBlot&&("ArrowLeft"===t?e?this.quill.setSelection(n.index-1,n.length+1,l.a.sources.USER):this.quill.setSelection(n.index-1,l.a.sources.USER):e?this.quill.setSelection(n.index,n.length+1,l.a.sources.USER):this.quill.setSelection(n.index+n.length+1,l.a.sources.USER),1))})),n}function N(t){return{key:t[0],shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],l.a.sources.USER)}}}function S(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler:function(e,n){var r=t?"prev":"next",i=n.line,o=i.parent[r];if(null!=o){if("table-row"===o.statics.blotName){for(var s=o.children.head,a=i;null!=a.prev;)a=a.prev,s=s.next;var u=s.offset(this.quill.scroll)+Math.min(n.offset,s.length()-1);this.quill.setSelection(u,0,l.a.sources.USER)}}else{var c=i.table()[r];null!=c&&(t?this.quill.setSelection(c.offset(this.quill.scroll)+c.length()-1,0,l.a.sources.USER):this.quill.setSelection(c.offset(this.quill.scroll),0,l.a.sources.USER))}return!1}}}function P(t){if("string"==typeof t||"number"==typeof t)t={key:t};else{if("object"!==p(t))return null;t=i()(t)}return t.shortKey&&(t[A]=t.shortKey,delete t.shortKey),t}function C(t){var e=t.quill,n=t.range,r=e.getLines(n),i={};if(r.length>1){var o=r[0].formats(),s=r[r.length-1].formats();i=a.AttributeMap.diff(s,o)||{}}e.deleteText(n,l.a.sources.USER),Object.keys(i).length>0&&e.formatLine(n.index,1,i,l.a.sources.USER),e.setSelection(n.index,l.a.sources.SILENT)}O.DEFAULTS={bindings:{bold:N("bold"),italic:N("italic"),underline:N("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler:function(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","+1",l.a.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","-1",l.a.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",l.a.sources.USER):null!=e.format.list&&this.quill.format("list",!1,l.a.sources.USER)}},"indent code-block":x(!0),"outdent code-block":x(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,l.a.sources.USER)}},tab:{key:"Tab",handler:function(t,e){if(e.format.table)return!0;this.quill.history.cutoff();var n=(new u.a).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(n,l.a.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,l.a.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler:function(){this.quill.format("blockquote",!1,l.a.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler:function(t,e){var n={list:!1};e.format.indent&&(n.indent=!1),this.quill.formatLine(t.index,t.length,n,l.a.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler:function(t){var e=d(this.quill.getLine(t.index),2),n=e[0],r=e[1],i=m(m({},n.formats()),{},{list:"checked"}),o=(new u.a).retain(t.index).insert("\n",i).retain(n.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,l.a.sources.USER),this.quill.setSelection(t.index+1,l.a.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=d(this.quill.getLine(t.index),2),r=n[0],i=n[1],o=(new u.a).retain(t.index).insert("\n",e.format).retain(r.length()-i-1).retain(1,{header:null});this.quill.updateContents(o,l.a.sources.USER),this.quill.setSelection(t.index+1,l.a.sources.SILENT),this.quill.scrollIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler:function(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler:function(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler:function(t){var e=this.quill.getModule("table");if(e){var n=d(e.getTable(t),4),r=n[0],i=function(t,e,n,r){return null==e.prev&&null==e.next?null==n.prev&&null==n.next?0===r?-1:1:null==n.prev?-1:1:null==e.prev?-1:null==e.next?1:null}(0,n[1],n[2],n[3]);if(null==i)return;var o=r.offset();if(i<0){var s=(new u.a).retain(o).insert("\n");this.quill.updateContents(s,l.a.sources.USER),this.quill.setSelection(t.index+1,t.length,l.a.sources.SILENT)}else if(i>0){o+=r.length();var a=(new u.a).retain(o).insert("\n");this.quill.updateContents(a,l.a.sources.USER),this.quill.setSelection(o,l.a.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler:function(t,e){var n=e.event,r=e.line,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,l.a.sources.USER):this.quill.setSelection(i+r.length(),l.a.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){if(null==this.quill.scroll.query("list"))return!0;var n,r=e.prefix.length,i=d(this.quill.getLine(t.index),2),o=i[0],s=i[1];if(s>r)return!0;switch(e.prefix.trim()){case"[]":case"[ ]":n="unchecked";break;case"[x]":n="checked";break;case"-":case"*":n="bullet";break;default:n="ordered"}this.quill.insertText(t.index," ",l.a.sources.USER),this.quill.history.cutoff();var a=(new u.a).retain(t.index-s).delete(r+1).retain(o.length()-2-s).retain(1,{list:n});return this.quill.updateContents(a,l.a.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-r,l.a.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler:function(t){for(var e=d(this.quill.getLine(t.index),2),n=e[0],r=e[1],i=2,o=n;null!=o&&o.length()<=1&&o.formats()["code-block"];)if(o=o.prev,(i-=1)<=0){var s=(new u.a).retain(t.index+n.length()-r-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,l.a.sources.USER),this.quill.setSelection(t.index-1,l.a.sources.SILENT),!1}return!0}},"embed left":R("ArrowLeft",!1),"embed left shift":R("ArrowLeft",!0),"embed right":R("ArrowRight",!1),"embed right shift":R("ArrowRight",!0),"table down":S(!1),"table up":S(!0)}}},function(t,e,n){"use strict";function r(t,e){for(var n=0;nr&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i)}else this.lastRecorded=r;0!==n.length()&&(this.stack.undo.push(n),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){h(this.stack.undo,t),h(this.stack.redo,t)}},{key:"undo",value:function(){this.change("undo","redo")}}])&&s(e.prototype,n),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(9).a);function h(t,e){for(var n=e,r=t.length-1;r>=0;r-=1){var i=t[r];t[r]=n.transform(i,!0),n=i.transform(n),0===t[r].length()&&t.splice(r,1)}}function p(t,e){var n=e.reduce((function(t,e){return t+(e.delete||0)}),0),i=e.length()-n;return function(t,e){var n=e.ops[e.ops.length-1];return null!=n&&(null!=n.insert?"string"==typeof n.insert&&n.insert.endsWith("\n"):null!=n.attributes&&Object.keys(n.attributes).some((function(e){return null!=t.query(e,r.Scope.BLOCK)})))}(t,e)&&(i-=1),i}f.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1}},,,function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(4),o=n(8),s=n(15),a=n(16),u=n(37),c=n(12),l=n(14),f=n(7),h=n(38),p=n(33),d=n(19),y=n(1),v=n.n(y),m=n(3);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function g(t,e){for(var n=0;n0&&this.options.handler.call(this,t,r)}}])&&g(e.prototype,n),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(n(9).a);T.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler:function(t,e){var n=this,r=e.map((function(t){return new Promise((function(e){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.readAsDataURL(t)}))}));Promise.all(r).then((function(e){var r=e.reduce((function(t,e){return t.insert({image:e})}),(new v.a).retain(t.index).delete(t.length));n.quill.updateContents(r,m.a.sources.USER),n.quill.setSelection(t.index+e.length,m.a.sources.SILENT)}))}};var A=T;r.a.register({"blots/block":i.d,"blots/block/embed":i.a,"blots/break":o.a,"blots/container":s.a,"blots/cursor":a.a,"blots/embed":u.a,"blots/inline":c.a,"blots/scroll":l.a,"blots/text":f.a,"modules/clipboard":h.a,"modules/history":p.a,"modules/keyboard":d.b,"modules/uploader":A}),e.default={Quill:r.a}},function(t,e,n){"use strict";var r=n(2),i=n(7);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function s(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?I(e,a):e}],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};return"italic"===r.fontStyle&&(n.italic=!0),"underline"===r.textDecoration&&(n.underline=!0),"line-through"===r.textDecoration&&(n.strike=!0),(r.fontWeight.startsWith("bold")||parseInt(r.fontWeight,10)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=I(e,n)),parseFloat(r.textIndent||0)>0?(new i.a).insert("\t").concat(e):e}],["li",function(t,e,n){var r=n.query(t);if(null==r||"list"!==r.blotName||!j(e,"\n"))return e;for(var o=-1,s=t.parentNode;null!=s;)["OL","UL"].includes(s.tagName)&&(o+=1),s=s.parentNode;return o<=0?e:e.reduce((function(t,e){return e.attributes&&"number"==typeof e.attributes.indent?t.push(e):t.insert(e.insert,g({indent:o},e.attributes||{}))}),new i.a)}],["ol, ul",function(t,e){var n="OL"===t.tagName?"ordered":"bullet";return I(e,"list",n)}],["pre",function(t,e,n){var r=n.query("code-block"),i=!r||r.formats(t,n);return I(e,"code-block",i)}],["tr",function(t,e){var n="TABLE"===t.parentNode.tagName?t.parentNode:t.parentNode.parentNode,r=Array.from(n.querySelectorAll("tr")).indexOf(t)+1;return I(e,"table",r)}],["b",U.bind(U,"bold")],["i",U.bind(U,"italic")],["strike",U.bind(U,"strike")],["style",function(){return new i.a}]],C=[l.a,d.a].reduce((function(t,e){return t[e.keyName]=e,t}),{}),L=[l.c,f.b,p.c,d.c,y.b,v.b].reduce((function(t,e){return t[e.keyName]=e,t}),{}),k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}(s,t);var e,n,r,o=x(s);function s(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(n=o.call(this,t,e)).quill.root.addEventListener("copy",(function(t){return n.onCaptureCopy(t,!1)})),n.quill.root.addEventListener("cut",(function(t){return n.onCaptureCopy(t,!0)})),n.quill.root.addEventListener("paste",n.onCapturePaste.bind(R(n))),n.matchers=[],P.concat(n.options.matchers).forEach((function(t){var e=_(t,2),r=e[0],i=e[1];n.addMatcher(r,i)})),n}return e=s,n=[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){var e=t.html,n=t.text,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r[h.c.blotName])return(new i.a).insert(n,w({},h.c.blotName,r[h.c.blotName]));if(!e)return(new i.a).insert(n||"");var o=this.convertHTML(e);return j(o,"\n")&&(null==o.ops[o.ops.length-1].attributes||r.table)?o.compose((new i.a).retain(o.length()-1).delete(1)):o}},{key:"convertHTML",value:function(t){var e=(new DOMParser).parseFromString(t,"text/html").body,n=new WeakMap,r=_(this.prepareMatching(e,n),2),i=r[0],o=r[1];return F(this.quill.scroll,e,i,o,n)}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.a.sources.API;if("string"==typeof t){var r=this.convert({html:t,text:""});this.quill.setContents(r,e),this.quill.setSelection(0,a.a.sources.SILENT)}else{var o=this.convert({html:e,text:""});this.quill.updateContents((new i.a).retain(t).concat(o),n),this.quill.setSelection(t+o.length(),a.a.sources.SILENT)}}},{key:"onCaptureCopy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t.defaultPrevented){t.preventDefault();var n=_(this.quill.selection.getRange(),1)[0];if(null!=n){var r=this.onCopy(n,e),i=r.html,o=r.text;t.clipboardData.setData("text/plain",o),t.clipboardData.setData("text/html",i),e&&Object(m.c)({range:n,quill:this.quill})}}}},{key:"onCapturePaste",value:function(t){if(!t.defaultPrevented&&this.quill.isEnabled()){t.preventDefault();var e=this.quill.getSelection(!0);if(null!=e){var n=t.clipboardData.getData("text/html"),r=t.clipboardData.getData("text/plain"),i=Array.from(t.clipboardData.files||[]);if(!n&&i.length>0)this.quill.uploader.upload(e,i);else{if(n&&i.length>0){var o=(new DOMParser).parseFromString(n,"text/html");if(1===o.body.childElementCount&&"IMG"===o.body.firstElementChild.tagName)return void this.quill.uploader.upload(e,i)}this.onPaste(e,{html:n,text:r})}}}}},{key:"onCopy",value:function(t){var e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}},{key:"onPaste",value:function(t,e){var n=e.text,r=e.html,o=this.quill.getFormat(t.index),s=this.convert({text:n,html:r},o);S.log("onPaste",s,{text:n,html:r});var u=(new i.a).retain(t.index).delete(t.length).concat(s);this.quill.updateContents(u,a.a.sources.USER),this.quill.setSelection(u.length()-t.length,a.a.sources.SILENT),this.quill.scrollIntoView()}},{key:"prepareMatching",value:function(t,e){var n=[],r=[];return this.matchers.forEach((function(i){var o=_(i,2),s=o[0],a=o[1];switch(s){case Node.TEXT_NODE:r.push(a);break;case Node.ELEMENT_NODE:n.push(a);break;default:Array.from(t.querySelectorAll(s)).forEach((function(t){e.has(t)?e.get(t).push(a):e.set(t,[a])}))}})),[n,r]}}],n&&A(e.prototype,n),r&&A(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(c.a);function I(t,e,n){return"object"===E(e)?Object.keys(e).reduce((function(t,n){return I(t,n,e[n])}),t):t.reduce((function(t,r){if(r.attributes&&r.attributes[e])return t.push(r);var i=n?w({},e,n):{};return t.insert(r.insert,g(g({},i),r.attributes))}),new i.a)}function j(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length0&&t.nextSibling)for(var r=t.nextSibling;null!=r;){if(B(r))return e.insert("\n");var i=n.query(r);if(i&&i.prototype instanceof s.a)return e.insert("\n");r=r.firstChild}}return e}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i,o=r(n(52));!function(t){t.iterator=function(t){return new o.default(t)},t.length=function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}}(i||(i={})),e.default=i},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,i,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||t,s),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],a]:t._events[u].push(a):(t._events[u]=a,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function u(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);is)){var h=e.slice(0,f);if((v=e.slice(f))===c){var p=Math.min(a,f);if((b=u.slice(0,p))===(E=h.slice(0,p)))return d(b,u.slice(p),h.slice(p),c)}}if(null===l||l===a){var y=a,v=(h=e.slice(0,y),e.slice(y));if(h===u){var m=Math.min(o-y,s-y);if((g=c.slice(c.length-m))===(w=v.slice(v.length-m)))return d(u,c.slice(0,c.length-m),v.slice(0,v.length-m),g)}}}if(r.length>0&&i&&0===i.length){var b=t.slice(0,r.index),g=t.slice(r.index+r.length);if(!(s<(p=b.length)+(m=g.length))){var E=e.slice(0,p),w=e.slice(s-m);if(b===E&&g===w)return d(b,t.slice(p,o-m),e.slice(p,s-m),g)}}return null}(t,e,l);if(h)return h}var p=a(t,e),y=t.substring(0,p);p=u(t=t.substring(p),e=e.substring(p));var v=t.substring(t.length-p),m=function(t,e){var c;if(!t)return[[r,e]];if(!e)return[[n,t]];var l=t.length>e.length?t:e,f=t.length>e.length?e:t,h=l.indexOf(f);if(-1!==h)return c=[[r,l.substring(0,h)],[i,f],[r,l.substring(h+f.length)]],t.length>e.length&&(c[0][0]=c[2][0]=n),c;if(1===f.length)return[[n,t],[r,e]];var p=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,i,o,s,f]:null}var o,s,c,l,f,h=i(n,r,Math.ceil(n.length/4)),p=i(n,r,Math.ceil(n.length/2));if(!h&&!p)return null;o=p?h&&h[4].length>p[4].length?h:p:h,t.length>e.length?(s=o[0],c=o[1],l=o[2],f=o[3]):(l=o[0],f=o[1],s=o[2],c=o[3]);var d=o[4];return[s,c,l,f,d]}(t,e);if(p){var d=p[0],y=p[1],v=p[2],m=p[3],b=p[4],g=o(d,v),E=o(y,m);return g.concat([[i,b]],E)}return function(t,e){for(var i=t.length,o=e.length,a=Math.ceil((i+o)/2),u=a,c=2*a,l=new Array(c),f=new Array(c),h=0;hi)v+=2;else if(_>o)y+=2;else if(d&&(O=u+p-E)>=0&&O=(A=i-f[O]))return s(t,e,R,_)}for(var T=-g+m;T<=g-b;T+=2){for(var A,O=u+T,x=(A=T===-g||T!==g&&f[O-1]i)b+=2;else if(x>o)m+=2;else if(!d){var R;if((w=u+p-T)>=0&&w=(A=i-A))return s(t,e,R,_)}}}return[[n,t],[r,e]]}(t,e)}(t=t.substring(0,t.length-p),e=e.substring(0,e.length-p));return y&&m.unshift([i,y]),v&&m.push([i,v]),c(m,f),m}function s(t,e,n,r){var i=t.substring(0,n),s=e.substring(0,r),a=t.substring(n),u=e.substring(r),c=o(i,s),l=o(a,u);return c.concat(l)}function a(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n=0&&p(t[v][1])){var m=t[v][1].slice(-1);if(t[v][1]=t[v][1].slice(0,-1),d=m+d,y=m+y,!t[v][1]){t.splice(v,1),s--;var b=v-1;t[b]&&t[b][0]===r&&(f++,y=t[b][1]+y,b--),t[b]&&t[b][0]===n&&(l++,d=t[b][1]+d,b--),v=b}}h(t[s][1])&&(m=t[s][1].charAt(0),t[s][1]=t[s][1].slice(1),d+=m,y+=m)}if(s0||y.length>0){d.length>0&&y.length>0&&(0!==(o=a(y,d))&&(v>=0?t[v][1]+=y.substring(0,o):(t.splice(0,0,[i,y.substring(0,o)]),s++),y=y.substring(o),d=d.substring(o)),0!==(o=u(y,d))&&(t[s][1]=y.substring(y.length-o)+t[s][1],y=y.substring(0,y.length-o),d=d.substring(0,d.length-o)));var g=f+l;0===d.length&&0===y.length?(t.splice(s-g,g),s-=g):0===d.length?(t.splice(s-g,g,[r,y]),s=s-g+1):0===y.length?(t.splice(s-g,g,[n,d]),s=s-g+1):(t.splice(s-g,g,[n,d],[r,y]),s=s-g+2)}0!==s&&t[s-1][0]===i?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,f=0,l=0,d="",y=""}""===t[t.length-1][1]&&t.pop();var E=!1;for(s=1;s=55296&&t<=56319}function f(t){return t>=56320&&t<=57343}function h(t){return f(t.charCodeAt(0))}function p(t){return l(t.charCodeAt(t.length-1))}function d(t,e,o,s){return p(t)||h(s)?null:function(t){for(var e=[],n=0;n0&&e.push(t[n]);return e}([[i,t],[n,e],[r,o],[i,s]])}function y(t,e,n){return o(t,e,n,!0)}y.INSERT=r,y.DELETE=n,y.EQUAL=i,t.exports=y},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i,o=r(n(10)),s=r(n(18));!function(t){t.compose=function(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o.default(e);for(var i in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i]);return Object.keys(r).length>0?r:void 0},t.diff=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return s.default(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},t.invert=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),t=t||{};var n=Object.keys(e).reduce((function(n,r){return e[r]!==t[r]&&void 0!==t[r]&&(n[r]=e[r]),n}),{});return Object.keys(t).reduce((function(n,r){return t[r]!==e[r]&&void 0===e[r]&&(n[r]=null),n}),n)},t.transform=function(t,e,n){if(void 0===n&&(n=!1),"object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}}(i||(i={})),e.default=i},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(42)),o=function(){function t(t){this.ops=t,this.index=0,this.offset=0}return t.prototype.hasNext=function(){return this.peekLength()<1/0},t.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=i.default.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},t.prototype.peek=function(){return this.ops[this.index]},t.prototype.peekLength=function(){return this.ops[this.index]?i.default.length(this.ops[this.index])-this.offset:1/0},t.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t}();e.default=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(36)}]).default},t.exports=e()},23278:(t,e,n)=>{"use strict";function r(t,e){var n=e&&e.cache?e.cache:l,r=e&&e.serializer?e.serializer:u;return(e&&e.strategy?e.strategy:a)(t,{cache:n,serializer:r})}function i(t,e,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),s=e.get(o);return void 0===s&&(s=t.call(this,r),e.set(o,s)),s}function o(t,e,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=e.get(i);return void 0===o&&(o=t.apply(this,r),e.set(i,o)),o}function s(t,e,n,r,i){return n.bind(e,t,r,i)}function a(t,e){return s(t,this,1===t.length?i:o,e.cache.create(),e.serializer)}n.d(e,{A:()=>f,H:()=>r});var u=function(){return JSON.stringify(arguments)};function c(){this.cache=Object.create(null)}c.prototype.get=function(t){return this.cache[t]},c.prototype.set=function(t,e){this.cache[t]=e};var l={create:function(){return new c}},f={variadic:function(t,e){return s(t,this,o,e.cache.create(),e.serializer)},monadic:function(t,e){return s(t,this,i,e.cache.create(),e.serializer)}}},264100:(t,e,n)=>{"use strict";n.d(e,{T:()=>i});var r=n(216386);function i(t,e){for(var n="",r=0;r>1),c=o(e);for("H"!=c&&"k"!=c||(u=0);u-- >0;)n+="a";for(;a-- >0;)n=c+n}else n+="J"===i?"H":i}return n}function o(t){var e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,i=t.language;return"root"!==i&&(n=t.maximize().region),(r._[n||""]||r._[i||""]||r._["".concat(i,"-001")]||r._["001"])[0]}},853219:(t,e,n)=>{"use strict";var r;n.d(e,{o:()=>r}),function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(r||(r={}))},363014:(t,e,n)=>{"use strict";n.d(e,{HI:()=>s.HI,Ii:()=>s.Ii,Jo:()=>s.Jo,O4:()=>s.O4,Qc:()=>u,VG:()=>s.VG,Wh:()=>s.Wh,Wi:()=>s.Wi,pe:()=>s.pe,rp:()=>s.rp,uf:()=>s.uf,yx:()=>s.yx});var r=n(46239),i=n(853219),o=n(655697),s=n(823511);function a(t){t.forEach((function(t){if(delete t.location,(0,s.Wi)(t)||(0,s.Jo)(t))for(var e in t.options)delete t.options[e].location,a(t.options[e].value);else(0,s.uf)(t)&&(0,s.Wh)(t.style)||((0,s.rp)(t)||(0,s.pe)(t))&&(0,s.Ii)(t.style)?delete t.style.location:(0,s.HI)(t)&&a(t.children)}))}function u(t,e){void 0===e&&(e={}),e=(0,r.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new o._(t,e).parse();if(n.err){var s=SyntaxError(i.o[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return(null==e?void 0:e.captureLocation)||a(n.val),n.val}o._},655697:(t,e,n)=>{"use strict";n.d(e,{_:()=>C});var r,i=n(46239),o=n(853219),s=n(823511),a=n(846500),u=n(473767),c=n(989558),l=n(264100),f=new RegExp("^".concat(a.p.source,"*")),h=new RegExp("".concat(a.p.source,"*$"));function p(t,e){return{start:t,end:e}}var d=!!String.prototype.startsWith&&"_a".startsWith("a",1),y=!!String.fromCodePoint,v=!!Object.fromEntries,m=!!String.prototype.codePointAt,b=!!String.prototype.trimStart,g=!!String.prototype.trimEnd,E=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},w=!0;try{w="a"===(null===(r=S("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===r?void 0:r[0])}catch(j){w=!1}var _,T=d?function(t,e,n){return t.startsWith(e,n)}:function(t,e,n){return t.slice(n,n+e.length)===e},A=y?String.fromCodePoint:function(){for(var t=[],e=0;eo;){if((n=t[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},O=v?Object.fromEntries:function(t){for(var e={},n=0,r=t;n=n)){var r,i=t.charCodeAt(e);return i<55296||i>56319||e+1===n||(r=t.charCodeAt(e+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},R=b?function(t){return t.trimStart()}:function(t){return t.replace(f,"")},N=g?function(t){return t.trimEnd()}:function(t){return t.replace(h,"")};function S(t,e){return new RegExp(t,e)}if(w){var P=S("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");_=function(t,e){var n;return P.lastIndex=e,null!==(n=P.exec(t)[1])&&void 0!==n?n:""}}else _=function(t,e){for(var n=[];;){var r=x(t,e);if(void 0===r||k(r)||I(r))break;n.push(r),e+=r>=65536?2:1}return A.apply(void 0,n)};var C=function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){if((a=this.parseArgument(t,n)).err)return a;r.push(a.val)}else{if(125===i&&t>0)break;if(35!==i||"plural"!==e&&"selectordinal"!==e){if(60===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(o.o.UNMATCHED_CLOSING_TAG,p(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&L(this.peek()||0)){if((a=this.parseTag(t,e)).err)return a;r.push(a.val)}else{var a;if((a=this.parseLiteral(t,e)).err)return a;r.push(a.val)}}else{var u=this.clonePosition();this.bump(),r.push({type:s.wD.pound,location:p(u,this.clonePosition())})}}}return{val:r,err:null}},t.prototype.parseTag=function(t,e){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:s.wD.literal,value:"<".concat(r,"/>"),location:p(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;var a=i.val,u=this.clonePosition();if(this.bumpIf("")?{val:{type:s.wD.tag,value:r,children:a,location:p(n,this.clonePosition())},err:null}:this.error(o.o.INVALID_TAG,p(u,this.clonePosition())))}return this.error(o.o.UNCLOSED_TAG,p(n,this.clonePosition()))}return this.error(o.o.INVALID_TAG,p(n,this.clonePosition()))},t.prototype.parseTagName=function(){var t,e=this.offset();for(this.bump();!this.isEOF()&&(45===(t=this.char())||46===t||t>=48&&t<=57||95===t||t>=97&&t<=122||t>=65&&t<=90||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039);)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(t,e){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(e);if(i)r+=i;else{var o=this.tryParseUnquoted(t,e);if(o)r+=o;else{var a=this.tryParseLeftAngleBracket();if(!a)break;r+=a}}}var u=p(n,this.clonePosition());return{val:{type:s.wD.literal,value:r,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(L(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t},t.prototype.tryParseQuote=function(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(n);this.bump()}return A.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===e||"selectordinal"===e)||125===n&&t>0?null:(this.bump(),A(n))},t.prototype.parseArgument=function(t,e){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(o.o.EXPECT_ARGUMENT_CLOSING_BRACE,p(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(o.o.EMPTY_ARGUMENT,p(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(o.o.MALFORMED_ARGUMENT,p(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(o.o.EXPECT_ARGUMENT_CLOSING_BRACE,p(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:s.wD.argument,value:r,location:p(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(o.o.EXPECT_ARGUMENT_CLOSING_BRACE,p(n,this.clonePosition())):this.parseArgumentOptions(t,e,r,n);default:return this.error(o.o.MALFORMED_ARGUMENT,p(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),n=_(this.message,e),r=e+n.length;return this.bumpTo(r),{value:n,location:p(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,n,r){var a,c=this.clonePosition(),f=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(f){case"":return this.error(o.o.EXPECT_ARGUMENT_TYPE,p(c,h));case"number":case"date":case"time":this.bumpSpace();var d=null;if(this.bumpIf(",")){this.bumpSpace();var y=this.clonePosition();if((A=this.parseSimpleArgStyleIfPossible()).err)return A;if(0===(g=N(A.val)).length)return this.error(o.o.EXPECT_ARGUMENT_STYLE,p(this.clonePosition(),this.clonePosition()));d={style:g,styleLocation:p(y,this.clonePosition())}}if((x=this.tryParseArgumentClose(r)).err)return x;var v=p(r,this.clonePosition());if(d&&T(null==d?void 0:d.style,"::",0)){var m=R(d.style.slice(2));if("number"===f)return(A=this.parseNumberSkeletonFromString(m,d.styleLocation)).err?A:{val:{type:s.wD.number,value:n,location:v,style:A.val},err:null};if(0===m.length)return this.error(o.o.EXPECT_DATE_TIME_SKELETON,v);var b=m;this.locale&&(b=(0,l.T)(m,this.locale));var g={type:s.aV.dateTime,pattern:b,location:d.styleLocation,parsedOptions:this.shouldParseSkeletons?(0,u.T)(b):{}};return{val:{type:"date"===f?s.wD.date:s.wD.time,value:n,location:v,style:g},err:null}}return{val:{type:"number"===f?s.wD.number:"date"===f?s.wD.date:s.wD.time,value:n,location:v,style:null!==(a=null==d?void 0:d.style)&&void 0!==a?a:null},err:null};case"plural":case"selectordinal":case"select":var E=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(o.o.EXPECT_SELECT_ARGUMENT_OPTIONS,p(E,(0,i.pi)({},E)));this.bumpSpace();var w=this.parseIdentifierIfPossible(),_=0;if("select"!==f&&"offset"===w.value){if(!this.bumpIf(":"))return this.error(o.o.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,p(this.clonePosition(),this.clonePosition()));var A;if(this.bumpSpace(),(A=this.tryParseDecimalInteger(o.o.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,o.o.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return A;this.bumpSpace(),w=this.parseIdentifierIfPossible(),_=A.val}var x,S=this.tryParsePluralOrSelectOptions(t,f,e,w);if(S.err)return S;if((x=this.tryParseArgumentClose(r)).err)return x;var P=p(r,this.clonePosition());return"select"===f?{val:{type:s.wD.select,value:n,options:O(S.val),location:P},err:null}:{val:{type:s.wD.plural,value:n,options:O(S.val),offset:_,pluralType:"plural"===f?"cardinal":"ordinal",location:P},err:null};default:return this.error(o.o.INVALID_ARGUMENT_TYPE,p(c,h))}},t.prototype.tryParseArgumentClose=function(t){return this.isEOF()||125!==this.char()?this.error(o.o.EXPECT_ARGUMENT_CLOSING_BRACE,p(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(o.o.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,p(n,this.clonePosition()));this.bump();break;case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var n=[];try{n=(0,c.O)(t)}catch(r){return this.error(o.o.INVALID_NUMBER_SKELETON,e)}return{val:{type:s.aV.number,tokens:n,location:e,parsedOptions:this.shouldParseSkeletons?(0,c.I)(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(t,e,n,r){for(var i,s=!1,a=[],u=new Set,c=r.value,l=r.location;;){if(0===c.length){var f=this.clonePosition();if("select"===e||!this.bumpIf("="))break;var h=this.tryParseDecimalInteger(o.o.EXPECT_PLURAL_ARGUMENT_SELECTOR,o.o.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;l=p(f,this.clonePosition()),c=this.message.slice(f.offset,this.offset())}if(u.has(c))return this.error("select"===e?o.o.DUPLICATE_SELECT_ARGUMENT_SELECTOR:o.o.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(s=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?o.o.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:o.o.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,p(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,e,n);if(y.err)return y;var v=this.tryParseArgumentClose(d);if(v.err)return v;a.push([c,{value:y.val,location:p(d,this.clonePosition())}]),u.add(c),this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,l=i.location}return 0===a.length?this.error("select"===e?o.o.EXPECT_SELECT_ARGUMENT_SELECTOR:o.o.EXPECT_PLURAL_ARGUMENT_SELECTOR,p(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(o.o.MISSING_OTHER_CLAUSE,p(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48&&s<=57))break;i=!0,o=10*o+(s-48),this.bump()}var a=p(r,this.clonePosition());return i?E(o*=n)?{val:o,err:null}:this.error(e,a):this.error(t,a)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=x(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},t.prototype.bumpIf=function(t){if(T(this.message,t,this.offset())){for(var e=0;e=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&k(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),n=this.message.charCodeAt(e+(t>=65536?2:1));return null!=n?n:null},t}();function L(t){return t>=97&&t<=122||t>=65&&t<=90}function k(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function I(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}},846500:(t,e,n)=>{"use strict";n.d(e,{p:()=>r});var r=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},216386:(t,e,n)=>{"use strict";n.d(e,{_:()=>r});var r={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]}},823511:(t,e,n)=>{"use strict";var r,i;function o(t){return t.type===r.literal}function s(t){return t.type===r.argument}function a(t){return t.type===r.number}function u(t){return t.type===r.date}function c(t){return t.type===r.time}function l(t){return t.type===r.select}function f(t){return t.type===r.plural}function h(t){return t.type===r.pound}function p(t){return t.type===r.tag}function d(t){return!(!t||"object"!=typeof t||t.type!==i.number)}function y(t){return!(!t||"object"!=typeof t||t.type!==i.dateTime)}n.d(e,{HI:()=>p,Ii:()=>y,Jo:()=>f,O4:()=>o,VG:()=>s,Wh:()=>d,Wi:()=>l,aV:()=>i,pe:()=>c,rp:()=>u,uf:()=>a,wD:()=>r,yx:()=>h}),function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"}(r||(r={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(i||(i={}))},473767:(t,e,n)=>{"use strict";n.d(e,{T:()=>i});var r=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function i(t){var e={};return t.replace(r,(function(t){var n=t.length;switch(t[0]){case"G":e.era=4===n?"long":5===n?"narrow":"short";break;case"y":e.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}},989558:(t,e,n)=>{"use strict";n.d(e,{I:()=>d,O:()=>o});var r=n(46239),i=n(234105);function o(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");for(var e=[],n=0,r=t.split(i.r).filter((function(t){return t.length>0}));n1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(u,(function(t,n,r,i,o,s){if(n)e.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(c.test(o.stem))e.minimumIntegerDigits=o.stem.length;else if(s.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(s,(function(t,n,r,i,o,s){return"*"===r?e.minimumFractionDigits=n.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:o&&s?(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length+s.length):(e.minimumFractionDigits=n.length,e.maximumFractionDigits=n.length),""}));var d=o.options[0];"w"===d?e=(0,r.pi)((0,r.pi)({},e),{trailingZeroDisplay:"stripIfInteger"}):d&&(e=(0,r.pi)((0,r.pi)({},e),l(d)))}else if(a.test(o.stem))e=(0,r.pi)((0,r.pi)({},e),l(o.stem));else{var y=f(o.stem);y&&(e=(0,r.pi)((0,r.pi)({},e),y));var v=h(o.stem);v&&(e=(0,r.pi)((0,r.pi)({},e),v))}}return e}},234105:(t,e,n)=>{"use strict";n.d(e,{r:()=>r});var r=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i},358579:(t,e)=>{"use strict";e.Z=function(){for(var t=[],e=0;e{"use strict";n.d(e,{Z:()=>i});var r=n(512910);function i(t,e){t.classList?t.classList.add(e):(0,r.Z)(t,e)||("string"==typeof t.className?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}},512910:(t,e,n)=>{"use strict";function r(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}n.d(e,{Z:()=>r})},139741:(t,e,n)=>{"use strict";function r(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function i(t,e){t.classList?t.classList.remove(e):"string"==typeof t.className?t.className=r(t.className,e):t.setAttribute("class",r(t.className&&t.className.baseVal||"",e))}n.d(e,{Z:()=>i})},172931:(t,e,n)=>{"use strict";n.d(e,{lX:()=>m});var r=n(110519),i=n(473124),o=(n(83780),n(196750));function s(t){return"/"===t.charAt(0)?t:"/"+t}function a(t,e){return function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)}(t,e)?t.substr(e.length):t}function u(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function c(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function l(t,e,n,o){var s;"string"==typeof t?(s=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t),s.state=e):(void 0===(s=(0,r.Z)({},t)).pathname&&(s.pathname=""),s.search?"?"!==s.search.charAt(0)&&(s.search="?"+s.search):s.search="",s.hash?"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash):s.hash="",void 0!==e&&void 0===s.state&&(s.state=e));try{s.pathname=decodeURI(s.pathname)}catch(a){throw a instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):a}return n&&(s.key=n),o?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=(0,i.Z)(s.pathname,o.pathname)):s.pathname=o.pathname:s.pathname||(s.pathname="/"),s}function f(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"==typeof t?t(e,n):t;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r{"use strict";n.d(e,{ZP:()=>r});const r=n(33976).C},33976:(t,e,n)=>{"use strict";n.d(e,{C:()=>c});var r=n(46239),i=n(363014),o=n(23278),s=n(15810);function a(t,e){return e?Object.keys(t).reduce((function(n,i){var o,s;return n[i]=(o=t[i],(s=e[i])?(0,r.pi)((0,r.pi)((0,r.pi)({},o||{}),s||{}),Object.keys(o).reduce((function(t,e){return t[e]=(0,r.pi)((0,r.pi)({},o[e]),s[e]||{}),t}),{})):o),n}),(0,r.pi)({},t)):t}function u(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}var c=function(){function t(e,n,i,c){var l,f=this;if(void 0===n&&(n=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=f.formatToParts(t);if(1===e.length)return e[0].value;var n=e.reduce((function(t,e){return t.length&&e.type===s.du.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(t){return(0,s.FK)(f.ast,f.locales,f.formatters,f.formats,t,void 0,f.message)},this.resolvedOptions=function(){var t;return{locale:(null===(t=f.resolvedLocale)||void 0===t?void 0:t.toString())||Intl.NumberFormat.supportedLocalesOf(f.locales)[0]}},this.getAst=function(){return f.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var h=c||{},p=(h.formatters,(0,r._T)(h,["formatters"]));this.ast=t.__parse(e,(0,r.pi)((0,r.pi)({},p),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=a(t.formats,i),this.formatters=c&&c.formatters||(void 0===(l=this.formatterCache)&&(l={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,o.H)((function(){for(var t,e=[],n=0;n0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])}},t.__parse=i.Qc,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}()},953836:(t,e,n)=>{"use strict";n.d(e,{C8:()=>s,HR:()=>u,YR:()=>a,jK:()=>r,u_:()=>o});var r,i=n(46239);!function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"}(r||(r={}));var o=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.code=n,i.originalMessage=r,i}return(0,i.ZT)(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),s=function(t){function e(e,n,i,o){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),r.INVALID_VALUE,o)||this}return(0,i.ZT)(e,t),e}(o),a=function(t){function e(e,n,i){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),r.INVALID_VALUE,i)||this}return(0,i.ZT)(e,t),e}(o),u=function(t){function e(e,n){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(n,'"'),r.MISSING_VALUE,n)||this}return(0,i.ZT)(e,t),e}(o)},15810:(t,e,n)=>{"use strict";n.d(e,{FK:()=>a,du:()=>r});var r,i=n(363014),o=n(953836);function s(t){return"function"==typeof t}function a(t,e,n,u,c,l,f){if(1===t.length&&(0,i.O4)(t[0]))return[{type:r.literal,value:t[0].value}];for(var h=[],p=0,d=t;p{"use strict";t.exports=t=>!(!t||t.length<3)&&(255===t[0]&&216===t[1]&&255===t[2])},385417:t=>{"use strict";t.exports=function(t){return!(!t||t.length<8)&&(137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7])}},635872:(t,e,n)=>{"use strict";n.d(e,{$g:()=>g,K5:()=>y,Om:()=>C,YN:()=>_,hA:()=>u,kq:()=>A,p4:()=>h,zO:()=>w});var r=n(519427),i=function(){};function o(t,e){void 0===e&&(e="Illegal state"),t||function(t){throw new Error("[mobx-utils] "+t)}(e)}var s=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(s(Object.getPrototypeOf(t))||[])},a=function(t){return function(t){var e=s(t);return e.filter((function(t,n){return e.indexOf(t)===n}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))},u="pending",c="fulfilled",l="rejected";function f(t){switch(this.state){case u:return t.pending&&t.pending(this.value);case l:return t.rejected&&t.rejected(this.value);case c:return t.fulfilled?t.fulfilled(this.value):this.value}}function h(t,e){if(o(arguments.length<=2,"fromPromise expects up to two arguments"),o("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var n=t;t.then((0,r.action)("observableFromPromise-resolve",(function(t){n.value=t,n.state=c})),(0,r.action)("observableFromPromise-reject",(function(t){n.value=t,n.state=l}))),n.isPromiseBasedObservable=!0,n.case=f;var i=!e||e.state!==c&&e.state!==u?void 0:e.value;return(0,r.extendObservable)(n,{value:i,state:u},{},{deep:!1}),n}!function(t){t.reject=(0,r.action)("fromPromise.reject",(function(e){var n=t(Promise.reject(e));return n.state=l,n.value=e,n})),t.resolve=(0,r.action)("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var n=t(Promise.resolve(e));return n.state=c,n.value=e,n}))}(h||(h={}));function p(t,e,n){void 0===e&&(e=i),void 0===n&&(n=void 0);var s=!1,a=!1,u=n,c=function(){s&&(s=!1,e())},l=(0,r.createAtom)("ResourceBasedObservable",(function(){o(!s&&!a),s=!0,t((function(t){(0,r._allowStateChanges)(!0,(function(){u=t,l.reportChanged()}))}))}),c);return{current:function(){return o(!a,"subscribingObservable has already been disposed"),l.reportObserved()||s||console.warn("Called `get` of a subscribingObservable outside a reaction. Current value will be returned but no new subscription has started"),u},dispose:function(){a=!0,c()},isAlive:function(){return s}}}var d=function(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};function y(t,e){var n;void 0===e&&(e=!1);var i=(0,r.computed)(t);return(n={subscribe:function(t){return"function"==typeof t?{unsubscribe:(0,r.observe)(i,(function(e){var n=e.newValue;return t(n)}),e)}:t&&"object"==typeof t&&t.next?{unsubscribe:(0,r.observe)(i,(function(e){var n=e.newValue;return t.next(n)}),e)}:{unsubscribe:function(){}}}})["function"==typeof Symbol&&Symbol.observable||"@@observable"]=function(){return this},n}!function(){function t(t,e){var n=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),(0,r.makeObservable)(this),(0,r.runInAction)((function(){n.current=e,n.subscription=t.subscribe(n)}))}Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(t.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.current=t}}),Object.defineProperty(t.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(t.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.current=t,this.dispose()}}),d([r.observable.ref],t.prototype,"current",void 0),d([r.action.bound],t.prototype,"next",null),d([r.action.bound],t.prototype,"complete",null),d([r.action.bound],t.prototype,"error",null)}();var v=function(){return v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},b=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function t(t){var e=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:r.observable.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:r.observable.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return e.localValues.has(t)}}),(0,r.makeObservable)(this),o((0,r.isObservableObject)(t),"createViewModel expects an observable object");var n=a(this);a(t).forEach((function(i){var s;if(!n.includes(i)&&i!==r.$mobx&&"__mobxDidRunLazyInitializers"!==i){if(o(-1===b.indexOf(i),"The propertyname "+i+" is reserved and cannot be used with viewModels"),(0,r.isComputedProp)(t,i)){var a=(0,r._getAdministration)(t,i),u=a.derivation.bind(e),c=null===(s=a.setter_)||void 0===s?void 0:s.bind(e);e.localComputedValues.set(i,(0,r.computed)(u,{set:c}))}var l=Object.getOwnPropertyDescriptor(t,i),f=l?{enumerable:l.enumerable}:{};Object.defineProperty(e,i,v(v({},f),{configurable:!0,get:function(){return(0,r.isComputedProp)(t,i)?e.localComputedValues.get(i).get():e.isPropertyDirty(i)?e.localValues.get(i):e.model[i]},set:(0,r.action)((function(n){(0,r.isComputedProp)(t,i)?e.localComputedValues.get(i).set(n):n!==e.model[i]?e.localValues.set(i,n):e.localValues.delete(i)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;(0,r.keys)(this.localValues).forEach((function(e){var n=t.localValues.get(e),i=t.model[e];(0,r.isObservableArray)(i)?i.replace(n):(0,r.isObservableMap)(i)?(i.clear(),i.merge(n)):(0,r.isComputed)(n)||(t.model[e]=n)})),this.localValues.clear()}}),Object.defineProperty(t.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(t.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.localValues.delete(t)}}),m([r.computed],t.prototype,"isDirty",null),m([r.computed],t.prototype,"changedValues",null),m([r.action.bound],t.prototype,"submit",null),m([r.action.bound],t.prototype,"reset",null),m([r.action.bound],t.prototype,"resetProperty",null)}();function g(t,e){var n=(0,r.getAtom)(t,e);if(!n)throw new Error("No computed provided, please provide an object created with `computed(() => expr)` or an object + property name");return(0,r.observe)(n,(function(){}))}var E={};function w(t){return void 0===t&&(t=1e3),(0,r._isComputingDerivation)()?(E[t]||(E[t]="number"==typeof t?function(t){var e;return p((function(n){n(Date.now()),e=setInterval((function(){return n(Date.now())}),t)}),(function(){clearInterval(e)}),Date.now())}(t):e=p((function(t){function n(){window.requestAnimationFrame((function(){t(Date.now()),e.isAlive()&&n()}))}t(Date.now()),n()}),(function(){}),Date.now())),E[t].current()):Date.now();var e}function _(t){return(0,r._isComputingDerivation)()||console.warn("'expr' should only be used inside other reactive functions."),(0,r.computed)(t).get()}var T=function(){return T=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t-1&&this.closest.has(this.args[t-1])}}),Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.assertNotDisposed();for(var e=this.args.length,n=this.closest,r=this.closestIdx;r0;r--)0===n[r].size&&n[r-1].delete(this.args[r-1]);this.isDisposed=!0}}),Object.defineProperty(t.prototype,"assertNotDisposed",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.isDisposed)throw new Error("Concurrent modification exception")}}),t}()),N=function(){function t(){Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"argsLength",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"last",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(t.prototype,"entry",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(-1===this.argsLength)this.argsLength=t.length;else if(this.argsLength!==t.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+t.length);return this.last&&(this.last.isDisposed=!0),this.last=new R(this.store,t)}}),t}(),S=function(){return S=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{!function(){function e(t,e){var n,r,i,o,s,a,u,c;for(n=3&t.length,r=t.length-n,i=e,s=3432918353,a=461845907,c=0;c>>16)*s&65535)<<16)&4294967295)<<15|u>>>17))*a+(((u>>>16)*a&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(u=0,n){case 3:u^=(255&t.charCodeAt(c+2))<<16;case 2:u^=(255&t.charCodeAt(c+1))<<8;case 1:i^=u=(65535&(u=(u=(65535&(u^=255&t.charCodeAt(c)))*s+(((u>>>16)*s&65535)<<16)&4294967295)<<15|u>>>17))*a+(((u>>>16)*a&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}var n=e;n.v2=function(t,e){for(var n,r=t.length,i=e^r,o=0;r>=4;)n=1540483477*(65535&(n=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&t.charCodeAt(o+2))<<16;case 2:i^=(255&t.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0},n.v3=e,t.exports=n}()},859108:(t,e,n)=>{"use strict";n.d(e,{E1:()=>o,Tl:()=>s,Zy:()=>a});var r,i=!("undefined"==typeof window||!window.document||!window.document.createElement);function o(){if(r)return r;if(!i||!window.document.body)return"indeterminate";var t=window.document.createElement("div");return t.appendChild(document.createTextNode("ABCD")),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),r="reverse",t.scrollLeft>0?r="default":(t.scrollLeft=2,t.scrollLeft<2&&(r="negative")),document.body.removeChild(t),r}function s(t,e){var n=t.scrollLeft;if("rtl"!==e)return n;var r=o();if("indeterminate"===r)return Number.NaN;switch(r){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n}return n}function a(t,e,n){if("rtl"===n){var r=o();if("indeterminate"!==r)switch(r){case"negative":t.scrollLeft=t.clientWidth-t.scrollWidth+e;break;case"reverse":t.scrollLeft=t.scrollWidth-t.clientWidth-e;break;default:t.scrollLeft=e}}else t.scrollLeft=e}},543501:(t,e,n)=>{"use strict";var r=n(338660);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},514993:(t,e,n)=>{t.exports=n(543501)()},338660:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},984956:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y,x:()=>p});var r=n(110519),i=n(122293),o=n(982721),s=n(875604),a=n(514993),u=n.n(a),c=n(361443),l=["client","offset","scroll","bounds","margin"];function f(t){var e=[];return l.forEach((function(n){t[n]&&e.push(n)})),e}function h(t,e){var n={};if(e.indexOf("client")>-1&&(n.client={top:t.clientTop,left:t.clientLeft,width:t.clientWidth,height:t.clientHeight}),e.indexOf("offset")>-1&&(n.offset={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}),e.indexOf("scroll")>-1&&(n.scroll={top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}),e.indexOf("bounds")>-1){var r=t.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(e.indexOf("margin")>-1){var i=getComputedStyle(t);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function p(t){return function(e){var n,a;return a=n=function(n){function a(){for(var e,r=arguments.length,i=new Array(r),o=0;o{"use strict";n.d(e,{Z:()=>h});var r=n(110519),i=n(122293),o=n(982721),s=n(741635),a=n(139741),u=n(875604),c=n(92009),l=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return(0,a.Z)(t,e)}))},f=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i{"use strict";n.d(e,{$r:()=>c,Ix:()=>p,Wj:()=>l,ZP:()=>v,cn:()=>h,d0:()=>f});var r=n(122293),i=n(982721),o=n(875604),s=n(204358),a=n(237811),u=n(469939),c="unmounted",l="exited",f="entering",h="entered",p="exiting",d=function(t){function e(e,n){var r;r=t.call(this,e,n)||this;var i,o=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?o?(i=l,r.appearStatus=f):i=h:i=e.unmountOnExit||e.mountOnEnter?c:l,r.state={status:i},r.nextCallback=null,r}(0,i.Z)(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===c?{status:l}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==f&&n!==h&&(e=f):n!==f&&n!==h||(e=p)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,r=this.props.timeout;return t=e=n=r,null!=r&&"number"!=typeof r&&(t=r.exit,e=r.enter,n=void 0!==r.appear?r.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){void 0===t&&(t=!1),null!==e?(this.cancelNextCallback(),e===f?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===l&&this.setState({status:c})},n.performEnter=function(t){var e=this,n=this.props.enter,r=this.context?this.context.isMounting:t,i=this.props.nodeRef?[r]:[s.findDOMNode(this),r],o=i[0],u=i[1],c=this.getTimeouts(),l=r?c.appear:c.enter;!t&&!n||a.Z.disabled?this.safeSetState({status:h},(function(){e.props.onEntered(o)})):(this.props.onEnter(o,u),this.safeSetState({status:f},(function(){e.props.onEntering(o,u),e.onTransitionEnd(l,(function(){e.safeSetState({status:h},(function(){e.props.onEntered(o,u)}))}))})))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:s.findDOMNode(this);e&&!a.Z.disabled?(this.props.onExit(r),this.safeSetState({status:p},(function(){t.props.onExiting(r),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:l},(function(){t.props.onExited(r)}))}))}))):this.safeSetState({status:l},(function(){t.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,e.nextCallback=null,t(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this),r=null==t&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===c)return null;var e=this.props,n=e.children,i=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,(0,r.Z)(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.createElement(u.Z.Provider,{value:null},"function"==typeof n?n(t,i):o.cloneElement(o.Children.only(n),i))},e}(o.Component);function y(){}d.contextType=u.Z,d.propTypes={},d.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:y,onEntering:y,onEntered:y,onExit:y,onExiting:y,onExited:y},d.UNMOUNTED=c,d.EXITED=l,d.ENTERING=f,d.ENTERED=h,d.EXITING=p;const v=d},262817:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var r=n(122293),i=n(110519),o=n(302699),s=n(982721),a=n(875604),u=n(469939),c=n(585895),l=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))},f=function(t){function e(e,n){var r,i=(r=t.call(this,e,n)||this).handleExited.bind((0,o.Z)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,s.Z)(e,t);var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(t,e){var n=e.children,r=e.handleExited;return{children:e.firstRender?(0,c.Kg)(t,r):(0,c.Rp)(t,n,r),firstRender:!1}},n.handleExited=function(t,e){var n=(0,c.n)(this.props.children);t.key in n||(t.props.onExited&&t.props.onExited(e),this.mounted&&this.setState((function(e){var n=(0,i.Z)({},e.children);return delete n[t.key],{children:n}})))},n.render=function(){var t=this.props,e=t.component,n=t.childFactory,i=(0,r.Z)(t,["component","childFactory"]),o=this.state.contextValue,s=l(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===e?a.createElement(u.Z.Provider,{value:o},s):a.createElement(u.Z.Provider,{value:o},a.createElement(e,i,s))},e}(a.Component);f.propTypes={},f.defaultProps={component:"div",childFactory:function(t){return t}};const h=f},469939:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(875604).createContext(null)},237811:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={disabled:!1}},585895:(t,e,n)=>{"use strict";n.d(e,{Kg:()=>s,Rp:()=>a,n:()=>i});var r=n(875604);function i(t,e){var n=Object.create(null);return t&&r.Children.map(t,(function(t){return t})).forEach((function(t){n[t.key]=function(t){return e&&(0,r.isValidElement)(t)?e(t):t}(t)})),n}function o(t,e,n){return null!=n[e]?n[e]:t.props[e]}function s(t,e){return i(t.children,(function(n){return(0,r.cloneElement)(n,{onExited:e.bind(null,n),in:!0,appear:o(n,"appear",t),enter:o(n,"enter",t),exit:o(n,"exit",t)})}))}function a(t,e,n){var s=i(t.children),a=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var r,i=Object.create(null),o=[];for(var s in t)s in e?o.length&&(i[s]=o,o=[]):o.push(s);var a={};for(var u in e){if(i[u])for(r=0;r{"use strict";n.d(e,{Z:()=>A});var r=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,r=Object.keys(e);n0},t}(),_="undefined"!=typeof WeakMap?new WeakMap:new r,T=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new w(e,n,this);_.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){T.prototype[t]=function(){var e;return(e=_.get(this))[t].apply(e,arguments)}}));const A=void 0!==o.ResizeObserver?o.ResizeObserver:T},473124:(t,e,n)=>{"use strict";function r(t){return"/"===t.charAt(0)}function i(t,e){for(var n=e,r=n+1,i=t.length;ro});const o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],s=t&&r(t),a=e&&r(e),u=s||a;if(t&&r(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var c=void 0;if(o.length){var l=o[o.length-1];c="."===l||".."===l||""===l}else c=!1;for(var f=0,h=o.length;h>=0;h--){var p=o[h];"."===p?i(o,h):".."===p?(i(o,h),f++):f&&(i(o,h),f--)}if(!u)for(;f--;f)o.unshift("..");!u||""===o[0]||o[0]&&r(o[0])||o.unshift("");var d=o.join("/");return c&&"/"!==d.substr(-1)&&(d+="/"),d}},733381:(t,e,n)=>{"use strict";n.d(e,{d:()=>i});var r=n(593787),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(881458).L)},487530:(t,e,n)=>{"use strict";n.d(e,{y:()=>u});var r=n(579956),i=n(864955),o=n(137877),s=n(800336),a=n(536600),u=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,o=(0,i.Y)(t,e,n);if(r?r.call(o,this.source):o.add(this.source||a.v.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),a.v.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){a.v.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),(0,r._)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=c(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(n){r(n),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[o.L]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e{"use strict";n.d(e,{c:()=>o});var r=n(536600),i=n(384496),o={closed:!0,next:function(t){},error:function(t){if(r.v.useDeprecatedSynchronousErrorHandling)throw t;(0,i.z)(t)},complete:function(){}}},895804:(t,e,n)=>{"use strict";n.d(e,{L:()=>i});var r=n(593787),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(881458).L)},958766:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},17986:(t,e,n)=>{"use strict";n.d(e,{Yc:()=>l,xQ:()=>f});var r=n(593787),i=n(487530),o=n(881458),s=n(660934),a=n(846196),u=n(165165),c=n(480851),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.ZT(e,t),e}(o.L),f=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.ZT(e,t),e.prototype[c.b]=function(){return new l(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.N;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i{"use strict";n.d(e,{W:()=>i});var r=n(593787),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.ZT(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(660934).w)},881458:(t,e,n)=>{"use strict";n.d(e,{L:()=>l});var r=n(593787),i=n(534721),o=n(483541),s=n(660934),a=n(480851),u=n(536600),c=n(384496),l=function(t){function e(n,r,i){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,s._parentSubscription=null,arguments.length){case 0:s.destination=o.c;break;case 1:if(!n){s.destination=o.c;break}if("object"==typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new f(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new f(s,n,r,i)}return s}return r.ZT(e,t),e.prototype[a.b]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this._parentSubscription=null,this},e}(s.w),f=function(t){function e(e,n,r,s){var a,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return(0,i.m)(n)?a=n:n&&(a=n.next,r=n.error,s=n.complete,n!==o.c&&(c=Object.create(n),(0,i.m)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=r,u._complete=s,u}return r.ZT(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=u.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):(0,c.z)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;(0,c.z)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};u.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),u.v.useDeprecatedSynchronousErrorHandling)throw n;(0,c.z)(n)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return u.v.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):((0,c.z)(r),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},660934:(t,e,n)=>{"use strict";n.d(e,{w:()=>c});var r=n(806242),i=n(423595),o=n(534721),s=n(471585),a=n(770557),u=n(542354),c=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this,c=n._parent,f=n._parents,h=n._unsubscribe,p=n._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var d=-1,y=f?f.length:0;c;)c.remove(this),c=++d{"use strict";n.d(e,{v:()=>i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},91776:(t,e,n)=>{"use strict";n.d(e,{N:()=>l});var r=n(593787),i=n(17986),o=n(487530),s=n(881458),a=n(660934),u=n(605032),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.ZT(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new a.w).add(this.source.subscribe(new f(this.getSubject(),this))),t.closed?(this._connection=null,t=a.w.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return(0,u.x)()(this)},e}(o.y).prototype,l={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:c._subscribe},_isComplete:{value:c._isComplete,writable:!0},getSubject:{value:c.getSubject},connect:{value:c.connect},refCount:{value:c.refCount}},f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.Yc);s.L},332098:(t,e,n)=>{"use strict";n.d(e,{E_:()=>i,cS:()=>o});var r=n(487530),i=new r.y((function(t){return t.complete()}));function o(t){return t?function(t){return new r.y((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},423713:(t,e,n)=>{"use strict";n.d(e,{D:()=>p});var r=n(487530),i=n(656159),o=n(741976),s=n(37159),a=n(356821),u=n(233771),c=n(343610),l=n(533083),f=n(671817),h=n(80506);function p(t,e){if(!e)return t instanceof r.y?t:new r.y((0,h.s)(t));if(null!=t){if((0,s.c)(t))return(0,f.u)(t,e);if((0,i.t)(t))return(0,c.p)(t,e);if((0,o.z)(t))return(0,u.n)(t,e);if((0,a.T)(t)||"string"==typeof t)return(0,l.E)(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},233771:(t,e,n)=>{"use strict";n.d(e,{n:()=>s});var r=n(487530),i=n(660934),o=n(152005);function s(t,e){return e?new r.y((function(n){var r=new i.w,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r})):new r.y((0,o.V)(t))}},467989:(t,e,n)=>{"use strict";n.d(e,{R:()=>a});var r=n(487530),i=n(806242),o=n(534721),s=n(858800);Object.prototype.toString;function a(t,e,n,c){return(0,o.m)(n)&&(c=n,n=void 0),c?a(t,e,n).pipe((0,s.U)((function(t){return(0,i.k)(t)?c.apply(void 0,t):c(t)}))):new r.y((function(r){u(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function u(t,e,n,r,i){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var s=t;t.addEventListener(e,n,i),o=function(){return s.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var a=t;t.on(e,n),o=function(){return a.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var c=t;t.addListener(e,n),o=function(){return c.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var l=0,f=t.length;l{"use strict";n.d(e,{E:()=>a});var r=n(487530),i=n(660934),o=n(991441),s=n(269284);function a(t,e){if(!t)throw new Error("Iterable cannot be null");return e?new r.y((function(n){var r,s=new i.w;return s.add((function(){r&&"function"==typeof r.return&&r.return()})),s.add(e.schedule((function(){r=t[o.hZ](),s.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(o){return void n.error(o)}e?n.complete():(n.next(t),this.schedule())}})))}))),s})):new r.y((0,s.u)(t))}},671817:(t,e,n)=>{"use strict";n.d(e,{u:()=>a});var r=n(487530),i=n(660934),o=n(137877),s=n(915024);function a(t,e){return e?new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){var i=t[o.L]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r})):new r.y((0,s.h)(t))}},343610:(t,e,n)=>{"use strict";n.d(e,{p:()=>s});var r=n(487530),i=n(660934),o=n(635378);function s(t,e){return e?new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r})):new r.y((0,o.A)(t))}},21103:(t,e,n)=>{"use strict";n.d(e,{T:()=>a});var r=n(487530),i=n(785789),o=n(444531),s=n(233771);function a(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===a&&1===t.length&&t[0]instanceof r.y?t[0]:(0,o.J)(n)((0,s.n)(t,a))}},127414:(t,e,n)=>{"use strict";n.d(e,{C:()=>o});var r=n(487530),i=n(900832),o=new r.y(i.Z)},980600:(t,e,n)=>{"use strict";n.d(e,{of:()=>a});var r=n(785789),i=n(233771),o=n(332098),s=n(829578);function a(){for(var t=[],e=0;e{"use strict";n.d(e,{i:()=>i});var r=n(487530);function i(t){var e=new r.y((function(e){e.next(t),e.complete()}));return e._isScalar=!0,e.value=t,e}},143206:(t,e,n)=>{"use strict";n.d(e,{b:()=>s});var r=n(593787),i=n(881458),o=n(934276);function s(t,e){return void 0===e&&(e=o.P),function(n){return n.lift(new a(t,e))}}var a=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.dueTime,this.scheduler))},t}(),u=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.ZT(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(i.L);function c(t){t.debouncedNext()}},953116:(t,e,n)=>{"use strict";n.d(e,{x:()=>a});var r=n(593787),i=n(881458),o=n(471585),s=n(770557);function a(t,e){return function(n){return n.lift(new u(t,e))}}var u=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.compare,this.keySelector))},t}(),c=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.ZT(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=(0,o.Y)(this.keySelector)(t))===s.T)return this.destination.error(s.T.e);var n=!1;if(this.hasKey){if((n=(0,o.Y)(this.compare)(this.key,e))===s.T)return this.destination.error(s.T.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))},e}(i.L)},223897:(t,e,n)=>{"use strict";n.d(e,{h:()=>o});var r=n(593787),i=n(881458);function o(t,e){return function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)},e}(i.L)},30240:(t,e,n)=>{"use strict";n.d(e,{x:()=>s});var r=n(593787),i=n(881458),o=n(660934);function s(t){return function(e){return e.lift(new a(t))}}var a=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.callback))},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new o.w(n)),r}return r.ZT(e,t),e}(i.L)},858800:(t,e,n)=>{"use strict";n.d(e,{U:()=>o});var r=n(593787),i=n(881458);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},t}(),a=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(i.L)},444531:(t,e,n)=>{"use strict";n.d(e,{J:()=>o});var r=n(516555),i=n(470432);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),(0,r.zg)(i.y,t)}},516555:(t,e,n)=>{"use strict";n.d(e,{zg:()=>c});var r=n(593787),i=n(251796),o=n(895804),s=n(733381),a=n(858800),u=n(423713);function c(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(c((function(n,r){return(0,u.D)(t(n,r)).pipe((0,a.U)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new l(t,n))})}var l=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project,this.concurrent))},t}(),f=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.L)},609917:(t,e,n)=>{"use strict";n.d(e,{O:()=>i});var r=n(91776);function i(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new o(i,e));var s=Object.create(n,r.N);return s.source=n,s.subjectFactory=i,s}}var o=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}()},605032:(t,e,n)=>{"use strict";n.d(e,{x:()=>o});var r=n(593787),i=n(881458);function o(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new a(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.L)},562972:(t,e,n)=>{"use strict";n.d(e,{B:()=>a});var r=n(609917),i=n(605032),o=n(17986);function s(){return new o.xQ}function a(){return function(t){return(0,i.x)()((0,r.O)(s)(t))}}},97093:(t,e,n)=>{"use strict";n.d(e,{w:()=>c});var r=n(593787),i=n(895804),o=n(733381),s=n(251796),a=n(858800),u=n(423713);function c(t,e){return"function"==typeof e?function(n){return n.pipe(c((function(n,r){return(0,u.D)(t(n,r)).pipe((0,a.U)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new l(t))}}var l=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe();var i=new o.d(this,void 0,void 0);this.destination.add(i),this.innerSubscription=(0,s.D)(this,t,e,n,i)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e}(i.L)},227119:(t,e,n)=>{"use strict";n.d(e,{q:()=>a});var r=n(593787),i=n(881458),o=n(941881),s=n(332098);function a(t){return function(e){return 0===t?(0,s.cS)():e.lift(new u(t))}}var u=function(){function t(t){if(this.total=t,this.total<0)throw new o.W}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.total))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(i.L)},915632:(t,e,n)=>{"use strict";n.d(e,{o:()=>o});var r=n(593787),i=n(881458);function o(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.index=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(r){return void n.error(r)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):n.complete()},e}(i.L)},868203:(t,e,n)=>{"use strict";n.d(e,{a:()=>i});var r=n(593787),i=function(t){function e(e,n){return t.call(this)||this}return r.ZT(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(660934).w)},352218:(t,e,n)=>{"use strict";n.d(e,{o:()=>i});var r=n(593787),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.ZT(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(n(868203).a)},565928:(t,e,n)=>{"use strict";n.d(e,{v:()=>o});var r=n(593787),i=n(958766),o=function(t){function e(n,r){void 0===r&&(r=i.b.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.ZT(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.b)},934276:(t,e,n)=>{"use strict";n.d(e,{P:()=>i});var r=n(352218),i=new(n(565928).v)(r.o)},991441:(t,e,n)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,{hZ:()=>i});var i=r()},137877:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},480851:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},941881:(t,e,n)=>{"use strict";function r(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}n.d(e,{W:()=>i}),r.prototype=Object.create(Error.prototype);var i=r},846196:(t,e,n)=>{"use strict";function r(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}n.d(e,{N:()=>i}),r.prototype=Object.create(Error.prototype);var i=r},542354:(t,e,n)=>{"use strict";function r(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}n.d(e,{B:()=>i}),r.prototype=Object.create(Error.prototype);var i=r},579956:(t,e,n)=>{"use strict";n.d(e,{_:()=>i});var r=n(881458);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.L?i:null}return!0}},770557:(t,e,n)=>{"use strict";n.d(e,{T:()=>r});var r={e:{}}},384496:(t,e,n)=>{"use strict";function r(t){setTimeout((function(){throw t}))}n.d(e,{z:()=>r})},470432:(t,e,n)=>{"use strict";function r(t){return t}n.d(e,{y:()=>r})},806242:(t,e,n)=>{"use strict";n.d(e,{k:()=>r});var r=Array.isArray||function(t){return t&&"number"==typeof t.length}},741976:(t,e,n)=>{"use strict";n.d(e,{z:()=>r});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},534721:(t,e,n)=>{"use strict";function r(t){return"function"==typeof t}n.d(e,{m:()=>r})},37159:(t,e,n)=>{"use strict";n.d(e,{c:()=>i});var r=n(137877);function i(t){return t&&"function"==typeof t[r.L]}},356821:(t,e,n)=>{"use strict";n.d(e,{T:()=>i});var r=n(991441);function i(t){return t&&"function"==typeof t[r.hZ]}},423595:(t,e,n)=>{"use strict";function r(t){return null!=t&&"object"==typeof t}n.d(e,{K:()=>r})},656159:(t,e,n)=>{"use strict";function r(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,{t:()=>r})},785789:(t,e,n)=>{"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,{K:()=>r})},900832:(t,e,n)=>{"use strict";function r(){}n.d(e,{Z:()=>r})},800336:(t,e,n)=>{"use strict";n.d(e,{U:()=>i});var r=n(900832);function i(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:r.Z}},80506:(t,e,n)=>{"use strict";n.d(e,{s:()=>p});var r=n(487530),i=n(152005),o=n(635378),s=n(269284),a=n(915024),u=n(741976),c=n(656159),l=n(423595),f=n(991441),h=n(137877),p=function(t){if(t instanceof r.y)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[h.L])return(0,a.h)(t);if((0,u.z)(t))return(0,i.V)(t);if((0,c.t)(t))return(0,o.A)(t);if(t&&"function"==typeof t[f.hZ])return(0,s.u)(t);var e=(0,l.K)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},152005:(t,e,n)=>{"use strict";n.d(e,{V:()=>r});var r=function(t){return function(e){for(var n=0,r=t.length;n{"use strict";n.d(e,{u:()=>i});var r=n(991441),i=function(t){return function(e){for(var n=t[r.hZ]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e}}},915024:(t,e,n)=>{"use strict";n.d(e,{h:()=>i});var r=n(137877),i=function(t){return function(e){var n=t[r.L]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}}},635378:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(384496),i=function(t){return function(e){return t.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,r.z),e}}},251796:(t,e,n)=>{"use strict";n.d(e,{D:()=>o});var r=n(733381),i=n(80506);function o(t,e,n,o,s){if(void 0===s&&(s=new r.d(t,n,o)),!s.closed)return(0,i.s)(e)(s)}},864955:(t,e,n)=>{"use strict";n.d(e,{Y:()=>s});var r=n(881458),i=n(480851),o=n(483541);function s(t,e,n){if(t){if(t instanceof r.L)return t;if(t[i.b])return t[i.b]()}return t||e||n?new r.L(t,e,n):new r.L(o.c)}},471585:(t,e,n)=>{"use strict";n.d(e,{Y:()=>s});var r,i=n(770557);function o(){try{return r.apply(this,arguments)}catch(t){return i.T.e=t,i.T}}function s(t){return r=t,o}},503216:(t,e,n)=>{var r=n(470977),i=n(81681),o=n(860389),s=n(653392),a=n(548087),u=n(340786),c=n(546580);c.alea=r,c.xor128=i,c.xorwow=o,c.xorshift7=s,c.xor4096=a,c.tychei=u,t.exports=c},470977:function(t,e,n){var r;!function(t,i,o){function s(t){var e=this,n=function(){var t=4022871197,e=function(e){e=String(e);for(var n=0;n>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)};return e}();e.next=function(){var t=2091639*e.s0+2.3283064365386963e-10*e.c;return e.s0=e.s1,e.s1=e.s2,e.s2=t-(e.c=0|t)},e.c=1,e.s0=n(" "),e.s1=n(" "),e.s2=n(" "),e.s0-=n(t),e.s0<0&&(e.s0+=1),e.s1-=n(t),e.s1<0&&(e.s1+=1),e.s2-=n(t),e.s2<0&&(e.s2+=1),n=null}function a(t,e){return e.c=t.c,e.s0=t.s0,e.s1=t.s1,e.s2=t.s2,e}function u(t,e){var n=new s(t),r=e&&e.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,r&&("object"==typeof r&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.alea=u}(0,t=n.nmd(t),n.amdD)},340786:function(t,e,n){var r;!function(t,i,o){function s(t){var e=this,n="";e.next=function(){var t=e.b,n=e.c,r=e.d,i=e.a;return t=t<<25^t>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-t|0,e.b=t=t<<20^t>>>12^n,e.c=n=n-r|0,e.d=r<<16^n>>>16^i,e.a=i-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,t===Math.floor(t)?(e.a=t/4294967296|0,e.b=0|t):n+=t;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.tychei=u}(0,t=n.nmd(t),n.amdD)},81681:function(t,e,n){var r;!function(t,i,o){function s(t){var e=this,n="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},t===(0|t)?e.x=t:n+=t;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.xor128=u}(0,t=n.nmd(t),n.amdD)},548087:function(t,e,n){var r;!function(t,i,o){function s(t){var e=this;e.next=function(){var t,n,r=e.w,i=e.X,o=e.i;return e.w=r=r+1640531527|0,n=i[o+34&127],t=i[o=o+1&127],n^=n<<13,t^=t<<17,n^=n>>>15,t^=t>>>12,n=i[o]=n^t,e.i=o,n+(r^r>>>16)|0},function(t,e){var n,r,i,o,s,a=[],u=128;for(e===(0|e)?(r=e,e=null):(e+="\0",r=0,u=Math.max(u,e.length)),i=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(s=s+1640531527|0,i=0==(n=a[127&o]^=r+s)?i+1:0);for(i>=128&&(a[127&(e&&e.length||0)]=-1),i=127,o=512;o>0;--o)r=a[i+34&127],n=a[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,a[i]=r^n;t.w=s,t.X=a,t.i=i}(e,t)}function a(t,e){return e.i=t.i,e.w=t.w,e.X=t.X.slice(),e}function u(t,e){null==t&&(t=+new Date);var n=new s(t),r=e&&e.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&(r.X&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.xor4096=u}(0,t=n.nmd(t),n.amdD)},653392:function(t,e,n){var r;!function(t,i,o){function s(t){var e=this;e.next=function(){var t,n,r=e.x,i=e.i;return t=r[i],n=(t^=t>>>7)^t<<24,n^=(t=r[i+1&7])^t>>>10,n^=(t=r[i+3&7])^t>>>3,n^=(t=r[i+4&7])^t<<7,t=r[i+7&7],n^=(t^=t<<13)^t<<9,r[i]=n,e.i=i+1&7,n},function(t,e){var n,r=[];if(e===(0|e))r[0]=e;else for(e=""+e,n=0;n0;--n)t.next()}(e,t)}function a(t,e){return e.x=t.x.slice(),e.i=t.i,e}function u(t,e){null==t&&(t=+new Date);var n=new s(t),r=e&&e.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&(r.x&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.xorshift7=u}(0,t=n.nmd(t),n.amdD)},860389:function(t,e,n){var r;!function(t,i,o){function s(t){var e=this,n="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^t^t<<1)|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,t===(0|t)?e.x=t:n+=t;for(var r=0;r>>4),e.next()}function a(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e.v=t.v,e.d=t.d,e}function u(t,e){var n=new s(t),r=e&&e.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&a(r,n),i.state=function(){return a(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.xorwow=u}(0,t=n.nmd(t),n.amdD)},546580:function(t,e,n){var r;!function(i,o,s){var a,u=256,c=s.pow(u,6),l=s.pow(2,52),f=2*l,h=u-1;function p(t,e,n){var r=[],h=m(v((e=1==e?{entropy:!0}:e||{}).entropy?[t,b(o)]:null==t?function(){try{var t;return a&&(t=a.randomBytes)?t=t(u):(t=new Uint8Array(u),(i.crypto||i.msCrypto).getRandomValues(t)),b(t)}catch(r){var e=i.navigator,n=e&&e.plugins;return[+new Date,i,n,i.screen,b(o)]}}():t,3),r),p=new d(r),g=function(){for(var t=p.g(6),e=c,n=0;t=f;)t/=2,e/=2,n>>>=1;return(t+n)/e};return g.int32=function(){return 0|p.g(4)},g.quick=function(){return p.g(4)/4294967296},g.double=g,m(b(p.S),o),(e.pass||n||function(t,e,n,r){return r&&(r.S&&y(r,p),t.state=function(){return y(p,{})}),n?(s.random=t,e):t})(g,h,"global"in e?e.global:this==s,e.state)}function d(t){var e,n=t.length,r=this,i=0,o=r.i=r.j=0,s=r.S=[];for(n||(t=[n++]);i{"use strict";var r,i=n(631400);t=n.hmd(t),r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:t;(0,i.Z)(r)},631400:(t,e,n)=>{"use strict";function r(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,{Z:()=>r})},741137:(t,e,n)=>{"use strict";n.d(e,{Wq:()=>T,ht:()=>_});var r=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],i=r.join(","),o="undefined"==typeof Element,s=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a=!o&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},u=function t(e,n){var r;void 0===n&&(n=!0);var i=null==e||null===(r=e.getAttribute)||void 0===r?void 0:r.call(e,"inert");return""===i||"true"===i||n&&e&&t(e.parentNode)},c=function(t,e,n){if(u(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(i));return e&&s.call(t,i)&&r.unshift(t),r=r.filter(n)},l=function t(e,n,r){for(var o=[],a=Array.from(e);a.length;){var c=a.shift();if(!u(c,!1))if("SLOT"===c.tagName){var l=c.assignedElements(),f=t(l.length?l:c.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:c,candidates:f})}else{s.call(c,i)&&r.filter(c)&&(n||!e.includes(c))&&o.push(c);var h=c.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(c),p=!u(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c));if(h&&p){var d=t(!0===h?c.children:h.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:c,candidates:d})}else a.unshift.apply(a,c.children)}}return o},f=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},h=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&!f(t)?0:t.tabIndex},p=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},d=function(t){return"INPUT"===t.tagName},y=function(t){return function(t){return d(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||a(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var i=function(t,e){for(var n=0;nsummary:first-of-type")?t.parentElement:t;if(s.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return v(t)}else{if("function"==typeof r){for(var o=t;t;){var u=t.parentElement,c=a(t);if(u&&!u.shadowRoot&&!0===r(u))return v(t);t=t.assignedSlot?t.assignedSlot:u||c===t.ownerDocument?u:c.host}t=o}if(function(t){var e,n,r,i,o=t&&a(t),s=null===(e=o)||void 0===e?void 0:e.host,u=!1;if(o&&o!==t)for(u=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=t&&null!==(i=t.ownerDocument)&&void 0!==i&&i.contains(t));!u&&s;){var c,l,f;u=!(null===(l=s=null===(c=o=a(s))||void 0===c?void 0:c.host)||void 0===l||null===(f=l.ownerDocument)||void 0===f||!f.contains(s))}return u}(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},b=function(t,e){return!(e.disabled||u(e)||function(t){return d(t)&&"hidden"===t.type}(e)||m(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n=0)},w=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scopeParent,s=o?e.scopeParent:e,a=function(t,e){var n=h(t);return n<0&&e&&!f(t)?0:n}(s,o),u=o?t(e.candidates):s;0===a?o?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:a,item:e,isScope:o,content:u})})),r.sort(p).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},_=function(t,e){var n;return n=(e=e||{}).getShadowRoot?l([t],e.includeContainer,{filter:g.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:E}):c(t,e.includeContainer,g.bind(null,e)),w(n)},T=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==s.call(t,i)&&g(e,t)}},196750:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r="Invariant failed";const i=function(t,e){if(!t)throw new Error(r)}},593787:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>i});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},83780:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};const i=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));var i=void 0===e?"undefined":r(e);if(i!==(void 0===n?"undefined":r(n)))return!1;if("object"===i){var o=e.valueOf(),s=n.valueOf();if(o!==e||s!==n)return t(o,s);var a=Object.keys(e),u=Object.keys(n);return a.length===u.length&&a.every((function(r){return t(e[r],n[r])}))}return!1}},552170:(t,e,n)=>{var r;!function(){function i(t,e,n){return t.call.apply(t.bind,arguments)}function o(t,e,n){if(!t)throw Error();if(2=e.f?i():t.fonts.load(function(t){return O(t)+" "+t.f+"00 300px "+T(t.c)}(e.a),e.h).then((function(t){1<=t.length?r():setTimeout(o,25)}),(function(){i()}))}()})),i=null,o=new Promise((function(t,n){i=setTimeout(n,e.f)}));Promise.race([o,r]).then((function(){i&&(clearTimeout(i),i=null),e.g(e.a)}),(function(){e.j(e.a)}))};var B={D:"serif",C:"sans-serif"},M=null;function D(){if(null===M){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);M=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return M}function F(t,e,n){for(var r in B)if(B.hasOwnProperty(r)&&e===t.f[B[r]]&&n===t.f[B[r]])return!0;return!1}function U(t){var e,n=t.g.a.offsetWidth,r=t.h.a.offsetWidth;(e=n===t.f.serif&&r===t.f["sans-serif"])||(e=D()&&F(t,n,r)),e?a()-t.A>=t.w?D()&&F(t,n,r)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?H(t,t.v):H(t,t.B):function(t){setTimeout(s((function(){U(this)}),t),50)}(t):H(t,t.v)}function H(t,e){setTimeout(s((function(){h(this.g.a),h(this.h.a),h(this.j.a),h(this.m.a),e(this.a)}),t),0)}function G(t,e,n){this.c=t,this.a=e,this.f=0,this.m=this.j=!1,this.s=n}j.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=a(),U(this)};var V=null;function q(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&p(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),S(t,"active")):N(t.a))}function z(t){this.j=t,this.a=new P,this.h=0,this.f=this.g=!0}function W(t,e,n,r,i){var o=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=i||null,a=r||{};if(0===n.length&&o)N(e.a);else{e.f+=n.length,o&&(e.j=o);var u,c=[];for(u=0;u{},993864:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t="",e=0;e{"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:()=>r})},110519:(t,e,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;er})},982721:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(565482);function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,(0,r.Z)(t,e)}},122293:(t,e,n)=>{"use strict";function r(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}n.d(e,{Z:()=>r})},565482:(t,e,n)=>{"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,{Z:()=>r})},474183:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>h,Qo:()=>d,RR:()=>c,US:()=>s,X5:()=>u,cv:()=>y,dp:()=>b,dr:()=>m,oo:()=>o,uY:()=>v,x7:()=>a});var r=n(573662);function i(t,e,n){let{reference:i,floating:o}=t;const s=(0,r.Qq)(e),a=(0,r.Wh)(e),u=(0,r.I4)(a),c=(0,r.k3)(e),l="y"===s,f=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,p=i[u]/2-o[u]/2;let d;switch(c){case"top":d={x:f,y:i.y-o.height};break;case"bottom":d={x:f,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:h};break;case"left":d={x:i.x-o.width,y:h};break;default:d={x:i.x,y:i.y}}switch((0,r.hp)(e)){case"start":d[a]-=p*(n&&l?-1:1);break;case"end":d[a]+=p*(n&&l?-1:1)}return d}const o=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,u=s.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:h}=i(l,r,c),p=r,d={},y=0;for(let v=0;v({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:s,platform:a,elements:u,middlewareData:c}=e,{element:l,padding:f=0}=(0,r.ku)(t,e)||{};if(null==l)return{};const h=(0,r.yd)(f),p={x:n,y:i},d=(0,r.Wh)(o),y=(0,r.I4)(d),v=await a.getDimensions(l),m="y"===d,b=m?"top":"left",g=m?"bottom":"right",E=m?"clientHeight":"clientWidth",w=s.reference[y]+s.reference[d]-p[d]-s.floating[y],_=p[d]-s.reference[d],T=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let A=T?T[E]:0;A&&await(null==a.isElement?void 0:a.isElement(T))||(A=u.floating[E]||s.floating[y]);const O=w/2-_/2,x=A/2-v[y]/2-1,R=(0,r.VV)(h[b],x),N=(0,r.VV)(h[g],x),S=R,P=A-v[y]-N,C=A/2-v[y]/2+O,L=(0,r.uZ)(S,C,P),k=!c.arrow&&null!=(0,r.hp)(o)&&C!==L&&s.reference[y]/2-(C(0,r.hp)(e)===t)),...n.filter((e=>(0,r.hp)(e)!==t))]:n.filter((t=>(0,r.k3)(t)===t))).filter((n=>!t||(0,r.hp)(n)===t||!!e&&(0,r.Go)(n)!==n))}(p||null,y,d):d,b=await s(e,v),g=(null==(n=u.autoPlacement)?void 0:n.index)||0,E=m[g];if(null==E)return{};const w=(0,r.i8)(E,a,await(null==l.isRTL?void 0:l.isRTL(f.floating)));if(c!==E)return{reset:{placement:m[0]}};const _=[b[(0,r.k3)(E)],b[w[0]],b[w[1]]],T=[...(null==(i=u.autoPlacement)?void 0:i.overflows)||[],{placement:E,overflows:_}],A=m[g+1];if(A)return{data:{index:g+1,overflows:T},reset:{placement:A}};const O=T.map((t=>{const e=(0,r.hp)(t.placement);return[t.placement,e&&h?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),x=(null==(o=O.filter((t=>t[2].slice(0,(0,r.hp)(t[0])?2:3).every((t=>t<=0))))[0])?void 0:o[0])||O[0][0];return x!==c?{data:{index:g+1,overflows:T},reset:{placement:x}}:{}}}},c=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:a,rects:u,initialPlacement:c,platform:l,elements:f}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...b}=(0,r.ku)(t,e);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=(0,r.k3)(o),E=(0,r.k3)(c)===c,w=await(null==l.isRTL?void 0:l.isRTL(f.floating)),_=d||(E||!m?[(0,r.pw)(c)]:(0,r.gy)(c));d||"none"===v||_.push(...(0,r.KX)(c,m,v,w));const T=[c,..._],A=await s(e,b),O=[];let x=(null==(i=a.flip)?void 0:i.overflows)||[];if(h&&O.push(A[g]),p){const t=(0,r.i8)(o,u,w);O.push(A[t[0]],A[t[1]])}if(x=[...x,{placement:o,overflows:O}],!O.every((t=>t<=0))){var R,N;const t=((null==(R=a.flip)?void 0:R.index)||0)+1,e=T[t];if(e)return{data:{index:t,overflows:x},reset:{placement:e}};let n=null==(N=x.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:N.placement;if(!n)switch(y){case"bestFit":{var S;const t=null==(S=x.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:S[0];t&&(n=t);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}};function l(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function f(t){return r.mA.some((e=>t[e]>=0))}const h=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...o}=(0,r.ku)(t,e);switch(i){case"referenceHidden":{const t=l(await s(e,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:f(t)}}}case"escaped":{const t=l(await s(e,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:f(t)}}}default:return{}}}}};function p(t){const e=(0,r.VV)(...t.map((t=>t.left))),n=(0,r.VV)(...t.map((t=>t.top)));return{x:e,y:n,width:(0,r.Fp)(...t.map((t=>t.right)))-e,height:(0,r.Fp)(...t.map((t=>t.bottom)))-n}}const d=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:i,rects:o,platform:s,strategy:a}=e,{padding:u=2,x:c,y:l}=(0,r.ku)(t,e),f=Array.from(await(null==s.getClientRects?void 0:s.getClientRects(i.reference))||[]),h=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),n=[];let i=null;for(let r=0;ri.height/2?n.push([t]):n[n.length-1].push(t),i=t}return n.map((t=>(0,r.JB)(p(t))))}(f),d=(0,r.JB)(p(f)),y=(0,r.yd)(u);const v=await s.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=c&&null!=l)return h.find((t=>c>t.left-y.left&&ct.top-y.top&&l=2){if("y"===(0,r.Qq)(n)){const t=h[0],e=h[h.length-1],i="top"===(0,r.k3)(n),o=t.top,s=e.bottom,a=i?t.left:e.left,u=i?t.right:e.right;return{top:o,bottom:s,left:a,right:u,width:u-a,height:s-o,x:a,y:o}}const t="left"===(0,r.k3)(n),e=(0,r.Fp)(...h.map((t=>t.right))),i=(0,r.VV)(...h.map((t=>t.left))),o=h.filter((n=>t?n.left===i:n.right===e)),s=o[0].top,a=o[o.length-1].bottom;return{top:s,bottom:a,left:i,right:e,width:e-i,height:a-s,x:i,y:s}}return d}},floating:i.floating,strategy:a});return o.reference.x!==v.reference.x||o.reference.y!==v.reference.y||o.reference.width!==v.reference.width||o.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};const y=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:s,placement:a,middlewareData:u}=e,c=await async function(t,e){const{placement:n,platform:i,elements:o}=t,s=await(null==i.isRTL?void 0:i.isRTL(o.floating)),a=(0,r.k3)(n),u=(0,r.hp)(n),c="y"===(0,r.Qq)(n),l=["left","top"].includes(a)?-1:1,f=s&&c?-1:1,h=(0,r.ku)(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:y}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return u&&"number"==typeof y&&(d="end"===u?-1*y:y),c?{x:d*f,y:p*l}:{x:p*l,y:d*f}}(e,t);return a===(null==(n=u.offset)?void 0:n.placement)&&null!=(i=u.arrow)&&i.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},v=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o}=e,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=(0,r.ku)(t,e),f={x:n,y:i},h=await s(e,l),p=(0,r.Qq)((0,r.k3)(o)),d=(0,r.Rn)(p);let y=f[d],v=f[p];if(a){const t="y"===d?"bottom":"right",e=y+h["y"===d?"top":"left"],n=y-h[t];y=(0,r.uZ)(e,y,n)}if(u){const t="y"===p?"bottom":"right",e=v+h["y"===p?"top":"left"],n=v-h[t];v=(0,r.uZ)(e,v,n)}const m=c.fn({...e,[d]:y,[p]:v});return{...m,data:{x:m.x-n,y:m.y-i}}}}},m=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:o,rects:s,middlewareData:a}=e,{offset:u=0,mainAxis:c=!0,crossAxis:l=!0}=(0,r.ku)(t,e),f={x:n,y:i},h=(0,r.Qq)(o),p=(0,r.Rn)(h);let d=f[p],y=f[h];const v=(0,r.ku)(u,e),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const t="y"===p?"height":"width",e=s.reference[p]-s.floating[t]+m.mainAxis,n=s.reference[p]+s.reference[t]-m.mainAxis;dn&&(d=n)}if(l){var b,g;const t="y"===p?"width":"height",e=["top","left"].includes((0,r.k3)(o)),n=s.reference[h]-s.floating[t]+(e&&(null==(b=a.offset)?void 0:b[h])||0)+(e?0:m.crossAxis),i=s.reference[h]+s.reference[t]+(e?0:(null==(g=a.offset)?void 0:g[h])||0)-(e?m.crossAxis:0);yi&&(y=i)}return{[p]:d,[h]:y}}}},b=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:i,platform:o,elements:a}=e,{apply:u=(()=>{}),...c}=(0,r.ku)(t,e),l=await s(e,c),f=(0,r.k3)(n),h=(0,r.hp)(n),p="y"===(0,r.Qq)(n),{width:d,height:y}=i.floating;let v,m;"top"===f||"bottom"===f?(v=f,m=h===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=f,v="end"===h?"top":"bottom");const b=y-l.top-l.bottom,g=d-l.left-l.right,E=(0,r.VV)(y-l[v],b),w=(0,r.VV)(d-l[m],g),_=!e.middlewareData.shift;let T=E,A=w;if(p?A=h||_?(0,r.VV)(w,g):g:T=h||_?(0,r.VV)(E,b):b,_&&!h){const t=(0,r.Fp)(l.left,0),e=(0,r.Fp)(l.right,0),n=(0,r.Fp)(l.top,0),i=(0,r.Fp)(l.bottom,0);p?A=d-2*(0!==t||0!==e?t+e:(0,r.Fp)(l.left,l.right)):T=y-2*(0!==n||0!==i?n+i:(0,r.Fp)(l.top,l.bottom))}await u({...e,availableWidth:A,availableHeight:T});const O=await o.getDimensions(a.floating);return d!==O.width||y!==O.height?{reset:{rects:!0}}:{}}}}},84186:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>S,Jv:()=>w,Me:()=>_,Qo:()=>C,RR:()=>R,US:()=>T,X5:()=>O,cv:()=>A,dp:()=>N,dr:()=>L,oo:()=>k,uY:()=>x,x7:()=>P});var r=n(573662),i=n(474183),o=n(291477);function s(t){const e=(0,o.Dx)(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=(0,o.Re)(t),a=s?t.offsetWidth:n,u=s?t.offsetHeight:i,c=(0,r.NM)(n)!==a||(0,r.NM)(i)!==u;return c&&(n=a,i=u),{width:n,height:i,$:c}}function a(t){return(0,o.kK)(t)?t:t.contextElement}function u(t){const e=a(t);if(!(0,o.Re)(e))return(0,r.ze)(1);const n=e.getBoundingClientRect(),{width:i,height:u,$:c}=s(e);let l=(c?(0,r.NM)(n.width):n.width)/i,f=(c?(0,r.NM)(n.height):n.height)/u;return l&&Number.isFinite(l)||(l=1),f&&Number.isFinite(f)||(f=1),{x:l,y:f}}const c=(0,r.ze)(0);function l(t){const e=(0,o.Jj)(t);return(0,o.Pf)()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:c}function f(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const s=t.getBoundingClientRect(),c=a(t);let f=(0,r.ze)(1);e&&(i?(0,o.kK)(i)&&(f=u(i)):f=u(t));const h=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==(0,o.Jj)(t))&&e}(c,n,i)?l(c):(0,r.ze)(0);let p=(s.left+h.x)/f.x,d=(s.top+h.y)/f.y,y=s.width/f.x,v=s.height/f.y;if(c){const t=(0,o.Jj)(c),e=i&&(0,o.kK)(i)?(0,o.Jj)(i):i;let n=t,r=n.frameElement;for(;r&&i&&e!==n;){const t=u(r),e=r.getBoundingClientRect(),i=(0,o.Dx)(r),s=e.left+(r.clientLeft+parseFloat(i.paddingLeft))*t.x,a=e.top+(r.clientTop+parseFloat(i.paddingTop))*t.y;p*=t.x,d*=t.y,y*=t.x,v*=t.y,p+=s,d+=a,n=(0,o.Jj)(r),r=n.frameElement}}return(0,r.JB)({width:y,height:v,x:p,y:d})}const h=[":popover-open",":modal"];function p(t){return h.some((e=>{try{return t.matches(e)}catch(n){return!1}}))}function d(t){return f((0,o.tF)(t)).left+(0,o.Lw)(t).scrollLeft}function y(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=(0,o.Jj)(t),r=(0,o.tF)(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){s=i.width,a=i.height;const t=(0,o.Pf)();(!t||t&&"fixed"===e)&&(u=i.offsetLeft,c=i.offsetTop)}return{width:s,height:a,x:u,y:c}}(t,n);else if("document"===e)i=function(t){const e=(0,o.tF)(t),n=(0,o.Lw)(t),i=t.ownerDocument.body,s=(0,r.Fp)(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),a=(0,r.Fp)(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+d(t);const c=-n.scrollTop;return"rtl"===(0,o.Dx)(i).direction&&(u+=(0,r.Fp)(e.clientWidth,i.clientWidth)-s),{width:s,height:a,x:u,y:c}}((0,o.tF)(t));else if((0,o.kK)(e))i=function(t,e){const n=f(t,!0,"fixed"===e),i=n.top+t.clientTop,s=n.left+t.clientLeft,a=(0,o.Re)(t)?u(t):(0,r.ze)(1);return{width:t.clientWidth*a.x,height:t.clientHeight*a.y,x:s*a.x,y:i*a.y}}(e,n);else{const n=l(t);i={...e,x:e.x-n.x,y:e.y-n.y}}return(0,r.JB)(i)}function v(t,e){const n=(0,o.Ow)(t);return!(n===e||!(0,o.kK)(n)||(0,o.Py)(n))&&("fixed"===(0,o.Dx)(n).position||v(n,e))}function m(t,e,n){const i=(0,o.Re)(e),s=(0,o.tF)(e),a="fixed"===n,u=f(t,!0,a,e);let c={scrollLeft:0,scrollTop:0};const l=(0,r.ze)(0);if(i||!i&&!a)if(("body"!==(0,o.wk)(e)||(0,o.ao)(s))&&(c=(0,o.Lw)(e)),i){const t=f(e,!0,a,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&(l.x=d(s));return{x:u.left+c.scrollLeft-l.x,y:u.top+c.scrollTop-l.y,width:u.width,height:u.height}}function b(t){return"static"===(0,o.Dx)(t).position}function g(t,e){return(0,o.Re)(t)&&"fixed"!==(0,o.Dx)(t).position?e?e(t):t.offsetParent:null}function E(t,e){const n=(0,o.Jj)(t);if(p(t))return n;if(!(0,o.Re)(t)){let e=(0,o.Ow)(t);for(;e&&!(0,o.Py)(e);){if((0,o.kK)(e)&&!b(e))return e;e=(0,o.Ow)(e)}return n}let r=g(t,e);for(;r&&(0,o.Ze)(r)&&b(r);)r=g(r,e);return r&&(0,o.Py)(r)&&b(r)&&!(0,o.hT)(r)?n:r||(0,o.gQ)(t)||n}const w={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const a="fixed"===s,c=(0,o.tF)(i),l=!!e&&p(e.floating);if(i===c||l&&a)return n;let h={scrollLeft:0,scrollTop:0},d=(0,r.ze)(1);const y=(0,r.ze)(0),v=(0,o.Re)(i);if((v||!v&&!a)&&(("body"!==(0,o.wk)(i)||(0,o.ao)(c))&&(h=(0,o.Lw)(i)),(0,o.Re)(i))){const t=f(i);d=u(i),y.x=t.x+i.clientLeft,y.y=t.y+i.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-h.scrollLeft*d.x+y.x,y:n.y*d.y-h.scrollTop*d.y+y.y}},getDocumentElement:o.tF,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const a=[..."clippingAncestors"===n?p(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=(0,o.Kx)(t,[],!1).filter((t=>(0,o.kK)(t)&&"body"!==(0,o.wk)(t))),i=null;const s="fixed"===(0,o.Dx)(t).position;let a=s?(0,o.Ow)(t):t;for(;(0,o.kK)(a)&&!(0,o.Py)(a);){const e=(0,o.Dx)(a),n=(0,o.hT)(a);n||"fixed"!==e.position||(i=null),(s?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||(0,o.ao)(a)&&!n&&v(t,a))?r=r.filter((t=>t!==a)):i=e,a=(0,o.Ow)(a)}return e.set(t,r),r}(e,this._c):[].concat(n),i],u=a[0],c=a.reduce(((t,n)=>{const i=y(e,n,s);return t.top=(0,r.Fp)(i.top,t.top),t.right=(0,r.VV)(i.right,t.right),t.bottom=(0,r.VV)(i.bottom,t.bottom),t.left=(0,r.Fp)(i.left,t.left),t}),y(e,u,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:E,getElementRects:async function(t){const e=this.getOffsetParent||E,n=this.getDimensions,r=await n(t.floating);return{reference:m(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=s(t);return{width:e,height:n}},getScale:u,isElement:o.kK,isRTL:function(t){return"rtl"===(0,o.Dx)(t).direction}};function _(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:h=!1}=i,p=a(t),d=s||u?[...p?(0,o.Kx)(p):[],...(0,o.Kx)(e)]:[];d.forEach((t=>{s&&t.addEventListener("scroll",n,{passive:!0}),u&&t.addEventListener("resize",n)}));const y=p&&l?function(t,e){let n,i=null;const s=(0,o.tF)(t);function a(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function o(u,c){void 0===u&&(u=!1),void 0===c&&(c=1),a();const{left:l,top:f,width:h,height:p}=t.getBoundingClientRect();if(u||e(),!h||!p)return;const d={rootMargin:-(0,r.GW)(f)+"px "+-(0,r.GW)(s.clientWidth-(l+h))+"px "+-(0,r.GW)(s.clientHeight-(f+p))+"px "+-(0,r.GW)(l)+"px",threshold:(0,r.Fp)(0,(0,r.VV)(1,c))||1};let y=!0;function v(t){const e=t[0].intersectionRatio;if(e!==c){if(!y)return o();e?o(!1,e):n=setTimeout((()=>{o(!1,1e-7)}),1e3)}y=!1}try{i=new IntersectionObserver(v,{...d,root:s.ownerDocument})}catch(m){i=new IntersectionObserver(v,d)}i.observe(t)}(!0),a}(p,n):null;let v,m=-1,b=null;c&&(b=new ResizeObserver((t=>{let[r]=t;r&&r.target===p&&b&&(b.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var t;null==(t=b)||t.observe(e)}))),n()})),p&&!h&&b.observe(p),b.observe(e));let g=h?f(t):null;return h&&function e(){const r=f(t);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n();g=r,v=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach((t=>{s&&t.removeEventListener("scroll",n),u&&t.removeEventListener("resize",n)})),null==y||y(),null==(t=b)||t.disconnect(),b=null,h&&cancelAnimationFrame(v)}}const T=i.US,A=i.cv,O=i.X5,x=i.uY,R=i.RR,N=i.dp,S=i.Cp,P=i.x7,C=i.Qo,L=i.dr,k=(t,e,n)=>{const r=new Map,o={platform:w,...n},s={...o.platform,_c:r};return(0,i.oo)(t,e,{...o,platform:s})}},694788:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>v,RR:()=>y,YF:()=>f,cv:()=>p,uY:()=>d,x7:()=>m});var r=n(84186),i=n(875604),o=n(204358),s="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function a(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!=r--;)if(!a(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!t.$$typeof)&&!a(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function u(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function c(t,e){const n=u(t);return Math.round(e*n)/n}function l(t){const e=i.useRef(t);return s((()=>{e.current=t})),e}function f(t){void 0===t&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:f=[],platform:h,elements:{reference:p,floating:d}={},transform:y=!0,whileElementsMounted:v,open:m}=t,[b,g]=i.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[E,w]=i.useState(f);a(E,f)||w(f);const[_,T]=i.useState(null),[A,O]=i.useState(null),x=i.useCallback((t=>{t!==P.current&&(P.current=t,T(t))}),[]),R=i.useCallback((t=>{t!==C.current&&(C.current=t,O(t))}),[]),N=p||_,S=d||A,P=i.useRef(null),C=i.useRef(null),L=i.useRef(b),k=null!=v,I=l(v),j=l(h),B=i.useCallback((()=>{if(!P.current||!C.current)return;const t={placement:e,strategy:n,middleware:E};j.current&&(t.platform=j.current),(0,r.oo)(P.current,C.current,t).then((t=>{const e={...t,isPositioned:!0};M.current&&!a(L.current,e)&&(L.current=e,o.flushSync((()=>{g(e)})))}))}),[E,e,n,j]);s((()=>{!1===m&&L.current.isPositioned&&(L.current.isPositioned=!1,g((t=>({...t,isPositioned:!1}))))}),[m]);const M=i.useRef(!1);s((()=>(M.current=!0,()=>{M.current=!1})),[]),s((()=>{if(N&&(P.current=N),S&&(C.current=S),N&&S){if(I.current)return I.current(N,S,B);B()}}),[N,S,B,I,k]);const D=i.useMemo((()=>({reference:P,floating:C,setReference:x,setFloating:R})),[x,R]),F=i.useMemo((()=>({reference:N,floating:S})),[N,S]),U=i.useMemo((()=>{const t={position:n,left:0,top:0};if(!F.floating)return t;const e=c(F.floating,b.x),r=c(F.floating,b.y);return y?{...t,transform:"translate("+e+"px, "+r+"px)",...u(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}}),[n,y,F.floating,b.x,b.y]);return i.useMemo((()=>({...b,update:B,refs:D,elements:F,floatingStyles:U})),[b,B,D,F,U])}const h=t=>({name:"arrow",options:t,fn(e){const{element:n,padding:i}="function"==typeof t?t(e):t;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?(0,r.x7)({element:n.current,padding:i}).fn(e):{}:n?(0,r.x7)({element:n,padding:i}).fn(e):{};var o}}),p=(t,e)=>({...(0,r.cv)(t),options:[t,e]}),d=(t,e)=>({...(0,r.uY)(t),options:[t,e]}),y=(t,e)=>({...(0,r.RR)(t),options:[t,e]}),v=(t,e)=>({...(0,r.Cp)(t),options:[t,e]}),m=(t,e)=>({...h(t),options:[t,e]})},725352:(t,e,n)=>{"use strict";var r;n.d(e,{YF:()=>x});var i=n(875604),o=(n(187128),n(573662),n(84186),n(291477)),s=n(694788);n(741137),n(204358);const a={...r||(r=n.t(i,2))},u=a.useInsertionEffect||(t=>t());function c(t){const e=i.useRef((()=>{0}));return u((()=>{e.current=t})),i.useCallback((function(){for(var t=arguments.length,n=new Array(t),r=0;r"floating-ui-"+Math.random().toString(36).slice(2,6)+b++;const E=a.useId||function(){const[t,e]=i.useState((()=>m?g():void 0));return d((()=>{null==t&&e(g())}),[]),i.useEffect((()=>{m=!0}),[]),t};function w(){const t=new Map;return{emit(e,n){var r;null==(r=t.get(e))||r.forEach((t=>t(n)))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,(null==(r=t.get(e))?void 0:r.filter((t=>t!==n)))||[])}}}const _=i.createContext(null),T=i.createContext(null),A=()=>{var t;return(null==(t=i.useContext(_))?void 0:t.id)||null},O=()=>i.useContext(T);function x(t){void 0===t&&(t={});const{nodeId:e}=t,n=function(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=E(),s=i.useRef({}),[a]=i.useState((()=>w())),u=null!=A(),[l,f]=i.useState(r.reference),h=c(((t,e,r)=>{s.current.openEvent=t?e:void 0,a.emit("openchange",{open:t,event:e,reason:r,nested:u}),null==n||n(t,e,r)})),p=i.useMemo((()=>({setPositionReference:f})),[]),d=i.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return i.useMemo((()=>({dataRef:s,open:e,onOpenChange:h,elements:d,events:a,floatingId:o,refs:p})),[e,h,d,a,o,p])}({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,a=r.elements,[u,l]=i.useState(null),[f,h]=i.useState(null),p=(null==a?void 0:a.reference)||u,y=i.useRef(null),v=O();d((()=>{p&&(y.current=p)}),[p]);const m=(0,s.YF)({...t,elements:{...a,...f&&{reference:f}}}),b=i.useCallback((t=>{const e=(0,o.kK)(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;h(e),m.refs.setReference(e)}),[m.refs]),g=i.useCallback((t=>{((0,o.kK)(t)||null===t)&&(y.current=t,l(t)),((0,o.kK)(m.refs.reference.current)||null===m.refs.reference.current||null!==t&&!(0,o.kK)(t))&&m.refs.setReference(t)}),[m.refs]),_=i.useMemo((()=>({...m.refs,setReference:g,setPositionReference:b,domReference:y})),[m.refs,g,b]),T=i.useMemo((()=>({...m.elements,domReference:p})),[m.elements,p]),x=i.useMemo((()=>({...m,...r,refs:_,elements:T,nodeId:e})),[m,_,T,e,r]);return d((()=>{r.dataRef.current.floatingContext=x;const t=null==v?void 0:v.nodesRef.current.find((t=>t.id===e));t&&(t.context=x)})),i.useMemo((()=>({...m,context:x,refs:_,elements:T})),[m,_,T,x])}},187128:(t,e,n)=>{"use strict";n.d(e,{AW:()=>i,G6:()=>l,Ie:()=>_,MM:()=>d,Me:()=>v,Pe:()=>m,U9:()=>b,V5:()=>h,Xf:()=>s,Zj:()=>u,cr:()=>c,ex:()=>y,ij:()=>a,j7:()=>E,p7:()=>w,r:()=>p,r3:()=>o});var r=n(291477);function i(t){let e=t.activeElement;for(;null!=(null==(n=e)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;e=e.shadowRoot.activeElement}return e}function o(t,e){if(!t||!e)return!1;const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&(0,r.Zq)(n)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function s(){const t=navigator.userAgentData;return null!=t&&t.platform?t.platform:navigator.platform}function a(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map((t=>{let{brand:e,version:n}=t;return e+"/"+n})).join(" "):navigator.userAgent}function u(t){return!(0!==t.mozInputSource||!t.isTrusted)||(f()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType)}function c(t){return!a().includes("jsdom/")&&(!f()&&0===t.width&&0===t.height||f()&&1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"===t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail&&"touch"===t.pointerType)}function l(){return/apple/i.test(navigator.vendor)}function f(){const t=/android/i;return t.test(s())||t.test(a())}function h(){return s().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function p(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function d(t){return"nativeEvent"in t}function y(t){return t.matches("html,body")}function v(t){return(null==t?void 0:t.ownerDocument)||document}function m(t,e){if(null==e)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return null!=n.target&&e.contains(n.target)}function b(t){return"composedPath"in t?t.composedPath()[0]:t.target}const g="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function E(t){return(0,r.Re)(t)&&t.matches(g)}function w(t){t.preventDefault(),t.stopPropagation()}function _(t){return!!t&&("combobox"===t.getAttribute("role")&&E(t))}},291477:(t,e,n)=>{"use strict";function r(t){return s(t)?(t.nodeName||"").toLowerCase():"#document"}function i(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){var e;return null==(e=(s(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function s(t){return t instanceof Node||t instanceof i(t).Node}function a(t){return t instanceof Element||t instanceof i(t).Element}function u(t){return t instanceof HTMLElement||t instanceof i(t).HTMLElement}function c(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof i(t).ShadowRoot)}function l(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=v(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function f(t){return["table","td","th"].includes(r(t))}function h(t){const e=d(),n=v(t);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function p(t){let e=b(t);for(;u(e)&&!y(e);){if(h(e))return e;e=b(e)}return null}function d(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function y(t){return["html","body","#document"].includes(r(t))}function v(t){return i(t).getComputedStyle(t)}function m(t){return a(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(t){if("html"===r(t))return t;const e=t.assignedSlot||t.parentNode||c(t)&&t.host||o(t);return c(e)?e.host:e}function g(t){const e=b(t);return y(e)?t.ownerDocument?t.ownerDocument.body:t.body:u(e)&&l(e)?e:g(e)}function E(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=g(t),s=o===(null==(r=t.ownerDocument)?void 0:r.body),a=i(o);return s?e.concat(a,a.visualViewport||[],l(o)?o:[],a.frameElement&&n?E(a.frameElement):[]):e.concat(o,E(o,[],n))}n.d(e,{Dx:()=>v,Jj:()=>i,Kx:()=>E,Lw:()=>m,Ow:()=>b,Pf:()=>d,Py:()=>y,Re:()=>u,Ze:()=>f,Zq:()=>c,ao:()=>l,gQ:()=>p,hT:()=>h,kK:()=>a,tF:()=>o,wk:()=>r})},573662:(t,e,n)=>{"use strict";n.d(e,{Ct:()=>o,Fp:()=>a,GW:()=>c,Go:()=>T,I4:()=>b,JB:()=>R,KX:()=>A,NM:()=>u,Qq:()=>g,Rn:()=>m,VV:()=>s,Wh:()=>E,gy:()=>_,hp:()=>v,i8:()=>w,k3:()=>y,ku:()=>d,mA:()=>r,pw:()=>O,uZ:()=>p,yd:()=>x,ze:()=>l});const r=["top","right","bottom","left"],i=["start","end"],o=r.reduce(((t,e)=>t.concat(e,e+"-"+i[0],e+"-"+i[1])),[]),s=Math.min,a=Math.max,u=Math.round,c=Math.floor,l=t=>({x:t,y:t}),f={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function p(t,e,n){return a(t,s(e,n))}function d(t,e){return"function"==typeof t?t(e):t}function y(t){return t.split("-")[0]}function v(t){return t.split("-")[1]}function m(t){return"x"===t?"y":"x"}function b(t){return"y"===t?"height":"width"}function g(t){return["top","bottom"].includes(y(t))?"y":"x"}function E(t){return m(g(t))}function w(t,e,n){void 0===n&&(n=!1);const r=v(t),i=E(t),o=b(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=O(s)),[s,O(s)]}function _(t){const e=O(t);return[T(t),e,T(e)]}function T(t){return t.replace(/start|end/g,(t=>h[t]))}function A(t,e,n,r){const i=v(t);let o=function(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}(y(t),"start"===n,r);return i&&(o=o.map((t=>t+"-"+i)),e&&(o=o.concat(o.map(T)))),o}function O(t){return t.replace(/left|right|bottom|top/g,(t=>f[t]))}function x(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function R(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}},300468:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;nf});var c=function(t){if(!t)return[];Array.isArray(t)||(t=[t]);for(var e={},n=0;n0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v),u(this,f,{writable:!0,value:void 0}),u(this,h,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,d,{writable:!0,value:void 0}),u(this,y,{writable:!0,value:void 0}),s(this,f,function(e){for(var n=c(e),r=0;r{"use strict";n.d(e,{en:()=>a});const r="one",i="two",o="few",s="other",a={cardinal:[r,s],ordinal:[r,i,o,s]}},150268:(t,e,n)=>{"use strict";n.d(e,{en:()=>r});const r=(t,e)=>{const n=String(t).split("."),r=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1),s=i&&n[0].slice(-2);return e?1==o&&11!=s?"one":2==o&&12!=s?"two":3==o&&13!=s?"few":"other":1==t&&r?"one":"other"}},391850:(t,e,n)=>{"use strict";n.d(e,{en:()=>i});const r=(t,e)=>"other",i=r},46239:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>i,_T:()=>s,ev:()=>u,gn:()=>a,pi:()=>o});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}Object.create;function u(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i